Commit 1920692d authored by vegorov@chromium.org's avatar vegorov@chromium.org

Revert r5174.

Review URL: http://codereview.chromium.org/2868108

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5177 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent a1a3aa46
...@@ -1252,11 +1252,9 @@ void CallStubCompiler::GenerateNameCheck(String* name, Label* miss) { ...@@ -1252,11 +1252,9 @@ void CallStubCompiler::GenerateNameCheck(String* name, Label* miss) {
} }
Object* CallStubCompiler::GenerateMissBranch() { void CallStubCompiler::GenerateMissBranch() {
Object* obj = StubCache::ComputeCallMiss(arguments().immediate(), kind_); Handle<Code> ic = ComputeCallMiss(arguments().immediate(), kind_);
if (obj->IsFailure()) return obj; __ Jump(ic, RelocInfo::CODE_TARGET);
__ Jump(Handle<Code>(Code::cast(obj)), RelocInfo::CODE_TARGET);
return obj;
} }
...@@ -1288,8 +1286,7 @@ Object* CallStubCompiler::CompileCallField(JSObject* object, ...@@ -1288,8 +1286,7 @@ Object* CallStubCompiler::CompileCallField(JSObject* object,
// Handle call cache miss. // Handle call cache miss.
__ bind(&miss); __ bind(&miss);
Object* obj = GenerateMissBranch(); GenerateMissBranch();
if (obj->IsFailure()) return obj;
// Return the generated code. // Return the generated code.
return GetCode(FIELD, name); return GetCode(FIELD, name);
...@@ -1340,8 +1337,7 @@ Object* CallStubCompiler::CompileArrayPushCall(Object* object, ...@@ -1340,8 +1337,7 @@ Object* CallStubCompiler::CompileArrayPushCall(Object* object,
// Handle call cache miss. // Handle call cache miss.
__ bind(&miss); __ bind(&miss);
Object* obj = GenerateMissBranch(); GenerateMissBranch();
if (obj->IsFailure()) return obj;
// Return the generated code. // Return the generated code.
return GetCode(function); return GetCode(function);
...@@ -1392,8 +1388,7 @@ Object* CallStubCompiler::CompileArrayPopCall(Object* object, ...@@ -1392,8 +1388,7 @@ Object* CallStubCompiler::CompileArrayPopCall(Object* object,
// Handle call cache miss. // Handle call cache miss.
__ bind(&miss); __ bind(&miss);
Object* obj = GenerateMissBranch(); GenerateMissBranch();
if (obj->IsFailure()) return obj;
// Return the generated code. // Return the generated code.
return GetCode(function); return GetCode(function);
...@@ -1566,8 +1561,7 @@ Object* CallStubCompiler::CompileCallConstant(Object* object, ...@@ -1566,8 +1561,7 @@ Object* CallStubCompiler::CompileCallConstant(Object* object,
} }
__ bind(&miss_in_smi_check); __ bind(&miss_in_smi_check);
Object* obj = GenerateMissBranch(); GenerateMissBranch();
if (obj->IsFailure()) return obj;
// Return the generated code. // Return the generated code.
return GetCode(function); return GetCode(function);
...@@ -1616,8 +1610,7 @@ Object* CallStubCompiler::CompileCallInterceptor(JSObject* object, ...@@ -1616,8 +1610,7 @@ Object* CallStubCompiler::CompileCallInterceptor(JSObject* object,
// Handle call cache miss. // Handle call cache miss.
__ bind(&miss); __ bind(&miss);
Object* obj = GenerateMissBranch(); GenerateMissBranch();
if (obj->IsFailure()) return obj;
// Return the generated code. // Return the generated code.
return GetCode(INTERCEPTOR, name); return GetCode(INTERCEPTOR, name);
...@@ -1701,8 +1694,7 @@ Object* CallStubCompiler::CompileCallGlobal(JSObject* object, ...@@ -1701,8 +1694,7 @@ Object* CallStubCompiler::CompileCallGlobal(JSObject* object,
// Handle call cache miss. // Handle call cache miss.
__ bind(&miss); __ bind(&miss);
__ IncrementCounter(&Counters::call_global_inline_miss, 1, r1, r3); __ IncrementCounter(&Counters::call_global_inline_miss, 1, r1, r3);
Object* obj = GenerateMissBranch(); GenerateMissBranch();
if (obj->IsFailure()) return obj;
// Return the generated code. // Return the generated code.
return GetCode(NORMAL, name); return GetCode(NORMAL, name);
......
...@@ -435,12 +435,6 @@ inline bool Heap::allow_allocation(bool new_state) { ...@@ -435,12 +435,6 @@ inline bool Heap::allow_allocation(bool new_state) {
return old; return old;
} }
inline bool Heap::allow_gc(bool new_state) {
bool old = gc_allowed_;
gc_allowed_ = new_state;
return old;
}
#endif #endif
......
...@@ -134,7 +134,6 @@ Heap::SurvivalRateTrend Heap::survival_rate_trend_ = Heap::STABLE; ...@@ -134,7 +134,6 @@ Heap::SurvivalRateTrend Heap::survival_rate_trend_ = Heap::STABLE;
#ifdef DEBUG #ifdef DEBUG
bool Heap::allocation_allowed_ = true; bool Heap::allocation_allowed_ = true;
bool Heap::gc_allowed_ = true;
int Heap::allocation_timeout_ = 0; int Heap::allocation_timeout_ = 0;
bool Heap::disallow_allocation_failure_ = false; bool Heap::disallow_allocation_failure_ = false;
...@@ -320,9 +319,6 @@ void Heap::ReportStatisticsAfterGC() { ...@@ -320,9 +319,6 @@ void Heap::ReportStatisticsAfterGC() {
void Heap::GarbageCollectionPrologue() { void Heap::GarbageCollectionPrologue() {
#ifdef DEBUG
ASSERT(gc_allowed_);
#endif
TranscendentalCache::Clear(); TranscendentalCache::Clear();
ClearJSFunctionResultCaches(); ClearJSFunctionResultCaches();
gc_count_++; gc_count_++;
......
...@@ -877,8 +877,6 @@ class Heap : public AllStatic { ...@@ -877,8 +877,6 @@ class Heap : public AllStatic {
#ifdef DEBUG #ifdef DEBUG
static bool IsAllocationAllowed() { return allocation_allowed_; } static bool IsAllocationAllowed() { return allocation_allowed_; }
static inline bool allow_allocation(bool enable); static inline bool allow_allocation(bool enable);
static bool IsGCAllowed() { return gc_allowed_; }
static inline bool allow_gc(bool enable);
static bool disallow_allocation_failure() { static bool disallow_allocation_failure() {
return disallow_allocation_failure_; return disallow_allocation_failure_;
...@@ -1080,7 +1078,6 @@ class Heap : public AllStatic { ...@@ -1080,7 +1078,6 @@ class Heap : public AllStatic {
#ifdef DEBUG #ifdef DEBUG
static bool allocation_allowed_; static bool allocation_allowed_;
static bool gc_allowed_;
// If the --gc-interval flag is set to a positive value, this // If the --gc-interval flag is set to a positive value, this
// variable holds the value indicating the number of allocations // variable holds the value indicating the number of allocations
...@@ -1683,20 +1680,6 @@ class AssertNoAllocation { ...@@ -1683,20 +1680,6 @@ class AssertNoAllocation {
bool old_state_; bool old_state_;
}; };
class AssertNoGC {
public:
AssertNoGC() {
old_state_ = Heap::allow_gc(false);
}
~AssertNoGC() {
Heap::allow_gc(old_state_);
}
private:
bool old_state_;
};
class DisableAssertNoAllocation { class DisableAssertNoAllocation {
public: public:
DisableAssertNoAllocation() { DisableAssertNoAllocation() {
...@@ -1719,12 +1702,6 @@ class AssertNoAllocation { ...@@ -1719,12 +1702,6 @@ class AssertNoAllocation {
~AssertNoAllocation() { } ~AssertNoAllocation() { }
}; };
class AssertNoGC {
public:
AssertNoGC() { }
~AssertNoGC() { }
};
class DisableAssertNoAllocation { class DisableAssertNoAllocation {
public: public:
DisableAssertNoAllocation() { } DisableAssertNoAllocation() { }
......
...@@ -1287,11 +1287,9 @@ void CallStubCompiler::GenerateNameCheck(String* name, Label* miss) { ...@@ -1287,11 +1287,9 @@ void CallStubCompiler::GenerateNameCheck(String* name, Label* miss) {
} }
Object* CallStubCompiler::GenerateMissBranch() { void CallStubCompiler::GenerateMissBranch() {
Object* obj = StubCache::ComputeCallMiss(arguments().immediate(), kind_); Handle<Code> ic = ComputeCallMiss(arguments().immediate(), kind_);
if (obj->IsFailure()) return obj; __ jmp(ic, RelocInfo::CODE_TARGET);
__ jmp(Handle<Code>(Code::cast(obj)), RelocInfo::CODE_TARGET);
return obj;
} }
...@@ -1342,8 +1340,7 @@ Object* CallStubCompiler::CompileCallField(JSObject* object, ...@@ -1342,8 +1340,7 @@ Object* CallStubCompiler::CompileCallField(JSObject* object,
// Handle call cache miss. // Handle call cache miss.
__ bind(&miss); __ bind(&miss);
Object* obj = GenerateMissBranch(); GenerateMissBranch();
if (obj->IsFailure()) return obj;
// Return the generated code. // Return the generated code.
return GetCode(FIELD, name); return GetCode(FIELD, name);
...@@ -1490,8 +1487,7 @@ Object* CallStubCompiler::CompileArrayPushCall(Object* object, ...@@ -1490,8 +1487,7 @@ Object* CallStubCompiler::CompileArrayPushCall(Object* object,
} }
__ bind(&miss); __ bind(&miss);
Object* obj = GenerateMissBranch(); GenerateMissBranch();
if (obj->IsFailure()) return obj;
// Return the generated code. // Return the generated code.
return GetCode(function); return GetCode(function);
...@@ -1574,8 +1570,7 @@ Object* CallStubCompiler::CompileArrayPopCall(Object* object, ...@@ -1574,8 +1570,7 @@ Object* CallStubCompiler::CompileArrayPopCall(Object* object,
1); 1);
__ bind(&miss); __ bind(&miss);
Object* obj = GenerateMissBranch(); GenerateMissBranch();
if (obj->IsFailure()) return obj;
// Return the generated code. // Return the generated code.
return GetCode(function); return GetCode(function);
...@@ -1638,8 +1633,8 @@ Object* CallStubCompiler::CompileStringCharCodeAtCall(Object* object, ...@@ -1638,8 +1633,8 @@ Object* CallStubCompiler::CompileStringCharCodeAtCall(Object* object,
__ ret((argc + 1) * kPointerSize); __ ret((argc + 1) * kPointerSize);
__ bind(&miss); __ bind(&miss);
Object* obj = GenerateMissBranch();
if (obj->IsFailure()) return obj; GenerateMissBranch();
// Return the generated code. // Return the generated code.
return GetCode(function); return GetCode(function);
...@@ -1705,8 +1700,9 @@ Object* CallStubCompiler::CompileStringCharAtCall(Object* object, ...@@ -1705,8 +1700,9 @@ Object* CallStubCompiler::CompileStringCharAtCall(Object* object,
__ ret((argc + 1) * kPointerSize); __ ret((argc + 1) * kPointerSize);
__ bind(&miss); __ bind(&miss);
Object* obj = GenerateMissBranch(); // Restore function name in ecx.
if (obj->IsFailure()) return obj;
GenerateMissBranch();
// Return the generated code. // Return the generated code.
return GetCode(function); return GetCode(function);
...@@ -1860,8 +1856,7 @@ Object* CallStubCompiler::CompileCallConstant(Object* object, ...@@ -1860,8 +1856,7 @@ Object* CallStubCompiler::CompileCallConstant(Object* object,
FreeSpaceForFastApiCall(masm(), eax); FreeSpaceForFastApiCall(masm(), eax);
} }
__ bind(&miss_in_smi_check); __ bind(&miss_in_smi_check);
Object* obj = GenerateMissBranch(); GenerateMissBranch();
if (obj->IsFailure()) return obj;
// Return the generated code. // Return the generated code.
return GetCode(function); return GetCode(function);
...@@ -1925,8 +1920,7 @@ Object* CallStubCompiler::CompileCallInterceptor(JSObject* object, ...@@ -1925,8 +1920,7 @@ Object* CallStubCompiler::CompileCallInterceptor(JSObject* object,
// Handle load cache miss. // Handle load cache miss.
__ bind(&miss); __ bind(&miss);
Object* obj = GenerateMissBranch(); GenerateMissBranch();
if (obj->IsFailure()) return obj;
// Return the generated code. // Return the generated code.
return GetCode(INTERCEPTOR, name); return GetCode(INTERCEPTOR, name);
...@@ -2011,8 +2005,7 @@ Object* CallStubCompiler::CompileCallGlobal(JSObject* object, ...@@ -2011,8 +2005,7 @@ Object* CallStubCompiler::CompileCallGlobal(JSObject* object,
// Handle call cache miss. // Handle call cache miss.
__ bind(&miss); __ bind(&miss);
__ IncrementCounter(&Counters::call_global_inline_miss, 1); __ IncrementCounter(&Counters::call_global_inline_miss, 1);
Object* obj = GenerateMissBranch(); GenerateMissBranch();
if (obj->IsFailure()) return obj;
// Return the generated code. // Return the generated code.
return GetCode(NORMAL, name); return GetCode(NORMAL, name);
......
...@@ -501,24 +501,20 @@ Object* CallICBase::LoadFunction(State state, ...@@ -501,24 +501,20 @@ Object* CallICBase::LoadFunction(State state,
// Lookup the property in the object. // Lookup the property in the object.
LookupResult lookup; LookupResult lookup;
{ LookupForRead(*object, *name, &lookup);
AssertNoGC nogc; // GC could invalidate the pointers held in lookup.
LookupForRead(*object, *name, &lookup); if (!lookup.IsProperty()) {
// If the object does not have the requested property, check which
if (!lookup.IsProperty()) { // exception we need to throw.
// If the object does not have the requested property, check which if (IsContextual(object)) {
// exception we need to throw. return ReferenceError("not_defined", name);
if (IsContextual(object)) {
return ReferenceError("not_defined", name);
}
return TypeError("undefined_method", object, name);
} }
return TypeError("undefined_method", object, name);
}
// Lookup is valid: Update inline cache and stub cache. // Lookup is valid: Update inline cache and stub cache.
if (FLAG_use_ic) { if (FLAG_use_ic) {
UpdateCaches(&lookup, state, object, name); UpdateCaches(&lookup, state, object, name);
}
} }
// Get the property. // Get the property.
...@@ -791,73 +787,69 @@ Object* LoadIC::Load(State state, Handle<Object> object, Handle<String> name) { ...@@ -791,73 +787,69 @@ Object* LoadIC::Load(State state, Handle<Object> object, Handle<String> name) {
// Named lookup in the object. // Named lookup in the object.
LookupResult lookup; LookupResult lookup;
{ LookupForRead(*object, *name, &lookup);
AssertNoGC nogc; // GC could invalidate the pointers held in lookup.
LookupForRead(*object, *name, &lookup);
// If we did not find a property, check if we need to throw an exception. // If we did not find a property, check if we need to throw an exception.
if (!lookup.IsProperty()) { if (!lookup.IsProperty()) {
if (FLAG_strict || IsContextual(object)) { if (FLAG_strict || IsContextual(object)) {
return ReferenceError("not_defined", name); return ReferenceError("not_defined", name);
}
LOG(SuspectReadEvent(*name, *object));
} }
LOG(SuspectReadEvent(*name, *object));
}
bool can_be_inlined = bool can_be_inlined =
FLAG_use_ic && FLAG_use_ic &&
state == PREMONOMORPHIC && state == PREMONOMORPHIC &&
lookup.IsProperty() && lookup.IsProperty() &&
lookup.IsCacheable() && lookup.IsCacheable() &&
lookup.holder() == *object && lookup.holder() == *object &&
lookup.type() == FIELD && lookup.type() == FIELD &&
!object->IsAccessCheckNeeded(); !object->IsAccessCheckNeeded();
if (can_be_inlined) { if (can_be_inlined) {
Map* map = lookup.holder()->map(); Map* map = lookup.holder()->map();
// Property's index in the properties array. If negative we have // Property's index in the properties array. If negative we have
// an inobject property. // an inobject property.
int index = lookup.GetFieldIndex() - map->inobject_properties(); int index = lookup.GetFieldIndex() - map->inobject_properties();
if (index < 0) { if (index < 0) {
// Index is an offset from the end of the object. // Index is an offset from the end of the object.
int offset = map->instance_size() + (index * kPointerSize); int offset = map->instance_size() + (index * kPointerSize);
if (PatchInlinedLoad(address(), map, offset)) { if (PatchInlinedLoad(address(), map, offset)) {
set_target(megamorphic_stub()); set_target(megamorphic_stub());
#ifdef DEBUG #ifdef DEBUG
if (FLAG_trace_ic) { if (FLAG_trace_ic) {
PrintF("[LoadIC : inline patch %s]\n", *name->ToCString()); PrintF("[LoadIC : inline patch %s]\n", *name->ToCString());
}
#endif
return lookup.holder()->FastPropertyAt(lookup.GetFieldIndex());
#ifdef DEBUG
} else {
if (FLAG_trace_ic) {
PrintF("[LoadIC : no inline patch %s (patching failed)]\n",
*name->ToCString());
}
} }
#endif
return lookup.holder()->FastPropertyAt(lookup.GetFieldIndex());
#ifdef DEBUG
} else { } else {
if (FLAG_trace_ic) { if (FLAG_trace_ic) {
PrintF("[LoadIC : no inline patch %s (not inobject)]\n", PrintF("[LoadIC : no inline patch %s (patching failed)]\n",
*name->ToCString()); *name->ToCString());
} }
} }
} else { } else {
if (FLAG_use_ic && state == PREMONOMORPHIC) { if (FLAG_trace_ic) {
if (FLAG_trace_ic) { PrintF("[LoadIC : no inline patch %s (not inobject)]\n",
PrintF("[LoadIC : no inline patch %s (not inlinable)]\n", *name->ToCString());
*name->ToCString());
#endif
}
} }
} }
} else {
// Update inline cache and stub cache. if (FLAG_use_ic && state == PREMONOMORPHIC) {
if (FLAG_use_ic) { if (FLAG_trace_ic) {
UpdateCaches(&lookup, state, object, name); PrintF("[LoadIC : no inline patch %s (not inlinable)]\n",
*name->ToCString());
#endif
}
} }
} }
// Update inline cache and stub cache.
if (FLAG_use_ic) {
UpdateCaches(&lookup, state, object, name);
}
PropertyAttributes attr; PropertyAttributes attr;
if (lookup.IsProperty() && lookup.type() == INTERCEPTOR) { if (lookup.IsProperty() && lookup.type() == INTERCEPTOR) {
// Get the property. // Get the property.
...@@ -1045,21 +1037,17 @@ Object* KeyedLoadIC::Load(State state, ...@@ -1045,21 +1037,17 @@ Object* KeyedLoadIC::Load(State state,
// Named lookup. // Named lookup.
LookupResult lookup; LookupResult lookup;
{ LookupForRead(*object, *name, &lookup);
AssertNoGC nogc; // GC could invalidate the pointers held in lookup.
LookupForRead(*object, *name, &lookup);
// If we did not find a property, check if we need to throw an exception. // If we did not find a property, check if we need to throw an exception.
if (!lookup.IsProperty()) { if (!lookup.IsProperty()) {
if (FLAG_strict || IsContextual(object)) { if (FLAG_strict || IsContextual(object)) {
return ReferenceError("not_defined", name); return ReferenceError("not_defined", name);
}
} }
}
if (FLAG_use_ic) { if (FLAG_use_ic) {
UpdateCaches(&lookup, state, object, name); UpdateCaches(&lookup, state, object, name);
}
} }
PropertyAttributes attr; PropertyAttributes attr;
...@@ -1257,8 +1245,6 @@ Object* StoreIC::Store(State state, ...@@ -1257,8 +1245,6 @@ Object* StoreIC::Store(State state,
// Lookup the property locally in the receiver. // Lookup the property locally in the receiver.
if (FLAG_use_ic && !receiver->IsJSGlobalProxy()) { if (FLAG_use_ic && !receiver->IsJSGlobalProxy()) {
AssertNoGC nogc; // GC could invalidate the pointers held in lookup.
LookupResult lookup; LookupResult lookup;
if (LookupForWrite(*receiver, *name, &lookup)) { if (LookupForWrite(*receiver, *name, &lookup)) {
...@@ -1432,17 +1418,13 @@ Object* KeyedStoreIC::Store(State state, ...@@ -1432,17 +1418,13 @@ Object* KeyedStoreIC::Store(State state,
return *value; return *value;
} }
{ // Lookup the property locally in the receiver.
AssertNoGC nogc; // GC could invalidate the pointers held in lookup. LookupResult lookup;
receiver->LocalLookup(*name, &lookup);
// Lookup the property locally in the receiver.
LookupResult lookup;
receiver->LocalLookup(*name, &lookup);
// Update inline cache and stub cache. // Update inline cache and stub cache.
if (FLAG_use_ic) { if (FLAG_use_ic) {
UpdateCaches(&lookup, state, receiver, name, value); UpdateCaches(&lookup, state, receiver, name, value);
}
} }
// Set the property. // Set the property.
......
...@@ -822,6 +822,13 @@ void StubCache::Clear() { ...@@ -822,6 +822,13 @@ void StubCache::Clear() {
// StubCompiler implementation. // StubCompiler implementation.
// Support function for computing call IC miss stubs.
Handle<Code> ComputeCallMiss(int argc, Code::Kind kind) {
CALL_HEAP_FUNCTION(StubCache::ComputeCallMiss(argc, kind), Code);
}
Object* LoadCallbackProperty(Arguments args) { Object* LoadCallbackProperty(Arguments args) {
ASSERT(args[0]->IsJSObject()); ASSERT(args[0]->IsJSObject());
ASSERT(args[1]->IsJSObject()); ASSERT(args[1]->IsJSObject());
......
...@@ -336,6 +336,10 @@ Object* CallInterceptorProperty(Arguments args); ...@@ -336,6 +336,10 @@ Object* CallInterceptorProperty(Arguments args);
Object* KeyedLoadPropertyWithInterceptor(Arguments args); Object* KeyedLoadPropertyWithInterceptor(Arguments args);
// Support function for computing call IC miss stubs.
Handle<Code> ComputeCallMiss(int argc, Code::Kind kind);
// The stub compiler compiles stubs for the stub cache. // The stub compiler compiles stubs for the stub cache.
class StubCompiler BASE_EMBEDDED { class StubCompiler BASE_EMBEDDED {
public: public:
...@@ -684,9 +688,7 @@ class CallStubCompiler: public StubCompiler { ...@@ -684,9 +688,7 @@ class CallStubCompiler: public StubCompiler {
void GenerateNameCheck(String* name, Label* miss); void GenerateNameCheck(String* name, Label* miss);
// Generates a jump to CallIC miss stub. Returns Failure if the jump cannot void GenerateMissBranch();
// be generated.
Object* GenerateMissBranch();
}; };
......
...@@ -820,11 +820,9 @@ void CallStubCompiler::GenerateNameCheck(String* name, Label* miss) { ...@@ -820,11 +820,9 @@ void CallStubCompiler::GenerateNameCheck(String* name, Label* miss) {
} }
Object* CallStubCompiler::GenerateMissBranch() { void CallStubCompiler::GenerateMissBranch() {
Object* obj = StubCache::ComputeCallMiss(arguments().immediate(), kind_); Handle<Code> ic = ComputeCallMiss(arguments().immediate(), kind_);
if (obj->IsFailure()) return obj; __ Jump(ic, RelocInfo::CODE_TARGET);
__ Jump(Handle<Code>(Code::cast(obj)), RelocInfo::CODE_TARGET);
return obj;
} }
...@@ -977,8 +975,7 @@ Object* CallStubCompiler::CompileCallConstant(Object* object, ...@@ -977,8 +975,7 @@ Object* CallStubCompiler::CompileCallConstant(Object* object,
// Handle call cache miss. // Handle call cache miss.
__ bind(&miss_in_smi_check); __ bind(&miss_in_smi_check);
Object* obj = GenerateMissBranch(); GenerateMissBranch();
if (obj->IsFailure()) return obj;
// Return the generated code. // Return the generated code.
return GetCode(function); return GetCode(function);
...@@ -1032,8 +1029,7 @@ Object* CallStubCompiler::CompileCallField(JSObject* object, ...@@ -1032,8 +1029,7 @@ Object* CallStubCompiler::CompileCallField(JSObject* object,
// Handle call cache miss. // Handle call cache miss.
__ bind(&miss); __ bind(&miss);
Object* obj = GenerateMissBranch(); GenerateMissBranch();
if (obj->IsFailure()) return obj;
// Return the generated code. // Return the generated code.
return GetCode(FIELD, name); return GetCode(FIELD, name);
...@@ -1190,8 +1186,8 @@ Object* CallStubCompiler::CompileArrayPushCall(Object* object, ...@@ -1190,8 +1186,8 @@ Object* CallStubCompiler::CompileArrayPushCall(Object* object,
} }
__ bind(&miss); __ bind(&miss);
Object* obj = GenerateMissBranch();
if (obj->IsFailure()) return obj; GenerateMissBranch();
// Return the generated code. // Return the generated code.
return GetCode(function); return GetCode(function);
...@@ -1274,8 +1270,8 @@ Object* CallStubCompiler::CompileArrayPopCall(Object* object, ...@@ -1274,8 +1270,8 @@ Object* CallStubCompiler::CompileArrayPopCall(Object* object,
argc + 1, argc + 1,
1); 1);
__ bind(&miss); __ bind(&miss);
Object* obj = GenerateMissBranch();
if (obj->IsFailure()) return obj; GenerateMissBranch();
// Return the generated code. // Return the generated code.
return GetCode(function); return GetCode(function);
...@@ -1361,8 +1357,7 @@ Object* CallStubCompiler::CompileCallInterceptor(JSObject* object, ...@@ -1361,8 +1357,7 @@ Object* CallStubCompiler::CompileCallInterceptor(JSObject* object,
// Handle load cache miss. // Handle load cache miss.
__ bind(&miss); __ bind(&miss);
Object* obj = GenerateMissBranch(); GenerateMissBranch();
if (obj->IsFailure()) return obj;
// Return the generated code. // Return the generated code.
return GetCode(INTERCEPTOR, name); return GetCode(INTERCEPTOR, name);
...@@ -1447,8 +1442,7 @@ Object* CallStubCompiler::CompileCallGlobal(JSObject* object, ...@@ -1447,8 +1442,7 @@ Object* CallStubCompiler::CompileCallGlobal(JSObject* object,
// Handle call cache miss. // Handle call cache miss.
__ bind(&miss); __ bind(&miss);
__ IncrementCounter(&Counters::call_global_inline_miss, 1); __ IncrementCounter(&Counters::call_global_inline_miss, 1);
Object* obj = GenerateMissBranch(); GenerateMissBranch();
if (obj->IsFailure()) return obj;
// Return the generated code. // Return the generated code.
return GetCode(NORMAL, name); return GetCode(NORMAL, name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment