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

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

Issue 546683003: Make KeyedLoads from a sloppy arguments array use a handler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Webkit test found bug, updating. Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/ic/ic.h ('k') | src/ic/ic-compiler.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/v8.h" 5 #include "src/v8.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 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after
1180 1180
1181 if (key->IsInternalizedString() || key->IsSymbol()) { 1181 if (key->IsInternalizedString() || key->IsSymbol()) {
1182 ASSIGN_RETURN_ON_EXCEPTION(isolate(), load_handle, 1182 ASSIGN_RETURN_ON_EXCEPTION(isolate(), load_handle,
1183 LoadIC::Load(object, Handle<Name>::cast(key)), 1183 LoadIC::Load(object, Handle<Name>::cast(key)),
1184 Object); 1184 Object);
1185 } else if (FLAG_use_ic && !object->IsAccessCheckNeeded()) { 1185 } else if (FLAG_use_ic && !object->IsAccessCheckNeeded()) {
1186 if (object->IsString() && key->IsNumber()) { 1186 if (object->IsString() && key->IsNumber()) {
1187 if (state() == UNINITIALIZED) stub = string_stub(); 1187 if (state() == UNINITIALIZED) stub = string_stub();
1188 } else if (object->IsJSObject()) { 1188 } else if (object->IsJSObject()) {
1189 Handle<JSObject> receiver = Handle<JSObject>::cast(object); 1189 Handle<JSObject> receiver = Handle<JSObject>::cast(object);
1190 if (receiver->elements()->map() == 1190 if (!Object::ToSmi(isolate(), key).is_null()) {
1191 isolate()->heap()->sloppy_arguments_elements_map()) {
1192 stub = sloppy_arguments_stub();
1193 } else if (!Object::ToSmi(isolate(), key).is_null() &&
1194 (!target().is_identical_to(sloppy_arguments_stub()))) {
1195 stub = LoadElementStub(receiver); 1191 stub = LoadElementStub(receiver);
1196 } 1192 }
1197 } 1193 }
1198 } 1194 }
1199 1195
1200 if (!is_target_set()) { 1196 if (!is_target_set()) {
1201 Code* generic = *generic_stub(); 1197 Code* generic = *generic_stub();
1202 if (*stub == generic) { 1198 if (*stub == generic) {
1203 TRACE_GENERIC_IC(isolate(), "KeyedLoadIC", "set generic"); 1199 TRACE_GENERIC_IC(isolate(), "KeyedLoadIC", "set generic");
1204 } 1200 }
(...skipping 1443 matching lines...) Expand 10 before | Expand all | Expand 10 after
2648 static const Address IC_utilities[] = { 2644 static const Address IC_utilities[] = {
2649 #define ADDR(name) FUNCTION_ADDR(name), 2645 #define ADDR(name) FUNCTION_ADDR(name),
2650 IC_UTIL_LIST(ADDR) NULL 2646 IC_UTIL_LIST(ADDR) NULL
2651 #undef ADDR 2647 #undef ADDR
2652 }; 2648 };
2653 2649
2654 2650
2655 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } 2651 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; }
2656 } 2652 }
2657 } // namespace v8::internal 2653 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ic/ic.h ('k') | src/ic/ic-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698