Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Side by Side Diff: src/ic/ic.cc

Issue 1358423002: [es6] Introduce spec compliant IsConstructor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix stupid fuzzer failure (constructor bit set on sloppy/strict arguments). Fix MIPS/MIPS64 typos, … Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/mips/builtins-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/ic/ic.h" 5 #include "src/ic/ic.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/arguments.h" 9 #include "src/arguments.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after
1152 1152
1153 if (receiver->IsStringWrapper() && 1153 if (receiver->IsStringWrapper() &&
1154 Name::Equals(isolate()->factory()->length_string(), lookup->name())) { 1154 Name::Equals(isolate()->factory()->length_string(), lookup->name())) {
1155 StringLengthStub string_length_stub(isolate()); 1155 StringLengthStub string_length_stub(isolate());
1156 return string_length_stub.GetCode(); 1156 return string_length_stub.GetCode();
1157 } 1157 }
1158 1158
1159 // Use specialized code for getting prototype of functions. 1159 // Use specialized code for getting prototype of functions.
1160 if (receiver->IsJSFunction() && 1160 if (receiver->IsJSFunction() &&
1161 Name::Equals(isolate()->factory()->prototype_string(), lookup->name()) && 1161 Name::Equals(isolate()->factory()->prototype_string(), lookup->name()) &&
1162 Handle<JSFunction>::cast(receiver)->should_have_prototype() && 1162 receiver->IsConstructor() &&
1163 !Handle<JSFunction>::cast(receiver) 1163 !Handle<JSFunction>::cast(receiver)
1164 ->map() 1164 ->map()
1165 ->has_non_instance_prototype()) { 1165 ->has_non_instance_prototype()) {
1166 Handle<Code> stub; 1166 Handle<Code> stub;
1167 FunctionPrototypeStub function_prototype_stub(isolate()); 1167 FunctionPrototypeStub function_prototype_stub(isolate());
1168 return function_prototype_stub.GetCode(); 1168 return function_prototype_stub.GetCode();
1169 } 1169 }
1170 1170
1171 Handle<Map> map = receiver_map(); 1171 Handle<Map> map = receiver_map();
1172 Handle<JSObject> holder = lookup->GetHolder<JSObject>(); 1172 Handle<JSObject> holder = lookup->GetHolder<JSObject>();
(...skipping 1947 matching lines...) Expand 10 before | Expand all | Expand 10 after
3120 KeyedLoadICNexus nexus(vector, vector_slot); 3120 KeyedLoadICNexus nexus(vector, vector_slot);
3121 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); 3121 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus);
3122 ic.UpdateState(receiver, key); 3122 ic.UpdateState(receiver, key);
3123 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key)); 3123 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key));
3124 } 3124 }
3125 3125
3126 return *result; 3126 return *result;
3127 } 3127 }
3128 } // namespace internal 3128 } // namespace internal
3129 } // namespace v8 3129 } // namespace v8
OLDNEW
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/mips/builtins-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698