Update V8 to r6238 as required by WebKit r75993
Change-Id: I12f638fcdd02d9102abab17d81c23cde63c08f22
diff --git a/src/code-stubs.h b/src/code-stubs.h
index b7804b7..76f29f0 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -1,4 +1,4 @@
-// Copyright 2006-2008 the V8 project authors. All rights reserved.
+// Copyright 2011 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -34,7 +34,7 @@
namespace internal {
// List of code stubs used on all platforms. The order in this list is important
-// as only the stubs up to and including RecordWrite allows nested stub calls.
+// as only the stubs up to and including Instanceof allows nested stub calls.
#define CODE_STUB_LIST_ALL_PLATFORMS(V) \
V(CallFunction) \
V(GenericBinaryOp) \
@@ -48,7 +48,7 @@
V(CompareIC) \
V(MathPow) \
V(TranscendentalCache) \
- V(RecordWrite) \
+ V(Instanceof) \
V(ConvertToDouble) \
V(WriteInt32ToHeapNumber) \
V(IntegerMod) \
@@ -59,7 +59,6 @@
V(GenericUnaryOp) \
V(RevertToNumber) \
V(ToBoolean) \
- V(Instanceof) \
V(CounterOp) \
V(ArgumentsAccess) \
V(RegExpExec) \
@@ -180,7 +179,7 @@
MajorKeyBits::encode(MajorKey());
}
- bool AllowsStubCalls() { return MajorKey() <= RecordWrite; }
+ bool AllowsStubCalls() { return MajorKey() <= Instanceof; }
class MajorKeyBits: public BitField<uint32_t, 0, kMajorBits> {};
class MinorKeyBits: public BitField<uint32_t, kMajorBits, kMinorBits> {};
@@ -327,22 +326,38 @@
public:
enum Flags {
kNoFlags = 0,
- kArgsInRegisters = 1 << 0
+ kArgsInRegisters = 1 << 0,
+ kCallSiteInlineCheck = 1 << 1,
+ kReturnTrueFalseObject = 1 << 2
};
- explicit InstanceofStub(Flags flags) : flags_(flags) { }
+ explicit InstanceofStub(Flags flags) : flags_(flags), name_(NULL) { }
+
+ static Register left();
+ static Register right();
void Generate(MacroAssembler* masm);
private:
Major MajorKey() { return Instanceof; }
- int MinorKey() { return args_in_registers() ? 1 : 0; }
+ int MinorKey() { return static_cast<int>(flags_); }
- bool args_in_registers() {
+ bool HasArgsInRegisters() const {
return (flags_ & kArgsInRegisters) != 0;
}
+ bool HasCallSiteInlineCheck() const {
+ return (flags_ & kCallSiteInlineCheck) != 0;
+ }
+
+ bool ReturnTrueFalseObject() const {
+ return (flags_ & kReturnTrueFalseObject) != 0;
+ }
+
+ const char* GetName();
+
Flags flags_;
+ char* name_;
};
@@ -707,6 +722,10 @@
void Generate(MacroAssembler* masm);
+ static int ExtractArgcFromMinorKey(int minor_key) {
+ return ArgcBits::decode(minor_key);
+ }
+
private:
int argc_;
InLoopFlag in_loop_;
@@ -738,11 +757,6 @@
bool ReceiverMightBeValue() {
return (flags_ & RECEIVER_MIGHT_BE_VALUE) != 0;
}
-
- public:
- static int ExtractArgcFromMinorKey(int minor_key) {
- return ArgcBits::decode(minor_key);
- }
};
@@ -902,6 +916,24 @@
DISALLOW_COPY_AND_ASSIGN(StringCharAtGenerator);
};
+
+class AllowStubCallsScope {
+ public:
+ AllowStubCallsScope(MacroAssembler* masm, bool allow)
+ : masm_(masm), previous_allow_(masm->allow_stub_calls()) {
+ masm_->set_allow_stub_calls(allow);
+ }
+ ~AllowStubCallsScope() {
+ masm_->set_allow_stub_calls(previous_allow_);
+ }
+
+ private:
+ MacroAssembler* masm_;
+ bool previous_allow_;
+
+ DISALLOW_COPY_AND_ASSIGN(AllowStubCallsScope);
+};
+
} } // namespace v8::internal
#endif // V8_CODE_STUBS_H_