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

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

Issue 1007783002: Remove --harmony-scoping flag. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: CR feedback Created 5 years, 9 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/full-codegen-ia32.cc ('k') | src/messages.js » ('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 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 } 715 }
716 Handle<Object> result; 716 Handle<Object> result;
717 ASSIGN_RETURN_ON_EXCEPTION( 717 ASSIGN_RETURN_ON_EXCEPTION(
718 isolate(), result, 718 isolate(), result,
719 Runtime::GetElementOrCharAt(isolate(), object, index), Object); 719 Runtime::GetElementOrCharAt(isolate(), object, index), Object);
720 return result; 720 return result;
721 } 721 }
722 722
723 bool use_ic = MigrateDeprecated(object) ? false : FLAG_use_ic; 723 bool use_ic = MigrateDeprecated(object) ? false : FLAG_use_ic;
724 724
725 if (FLAG_harmony_scoping && object->IsGlobalObject() && name->IsString()) { 725 if (object->IsGlobalObject() && name->IsString()) {
726 // Look up in script context table. 726 // Look up in script context table.
727 Handle<String> str_name = Handle<String>::cast(name); 727 Handle<String> str_name = Handle<String>::cast(name);
728 Handle<GlobalObject> global = Handle<GlobalObject>::cast(object); 728 Handle<GlobalObject> global = Handle<GlobalObject>::cast(object);
729 Handle<ScriptContextTable> script_contexts( 729 Handle<ScriptContextTable> script_contexts(
730 global->native_context()->script_context_table()); 730 global->native_context()->script_context_table());
731 731
732 ScriptContextTable::LookupResult lookup_result; 732 ScriptContextTable::LookupResult lookup_result;
733 if (ScriptContextTable::Lookup(script_contexts, str_name, &lookup_result)) { 733 if (ScriptContextTable::Lookup(script_contexts, str_name, &lookup_result)) {
734 Handle<Object> result = 734 Handle<Object> result =
735 FixedArray::get(ScriptContextTable::GetContext( 735 FixedArray::get(ScriptContextTable::GetContext(
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
1536 } 1536 }
1537 1537
1538 it->PrepareTransitionToDataProperty(value, NONE, store_mode); 1538 it->PrepareTransitionToDataProperty(value, NONE, store_mode);
1539 return it->IsCacheableTransition(); 1539 return it->IsCacheableTransition();
1540 } 1540 }
1541 1541
1542 1542
1543 MaybeHandle<Object> StoreIC::Store(Handle<Object> object, Handle<Name> name, 1543 MaybeHandle<Object> StoreIC::Store(Handle<Object> object, Handle<Name> name,
1544 Handle<Object> value, 1544 Handle<Object> value,
1545 JSReceiver::StoreFromKeyed store_mode) { 1545 JSReceiver::StoreFromKeyed store_mode) {
1546 if (FLAG_harmony_scoping && object->IsGlobalObject() && name->IsString()) { 1546 if (object->IsGlobalObject() && name->IsString()) {
1547 // Look up in script context table. 1547 // Look up in script context table.
1548 Handle<String> str_name = Handle<String>::cast(name); 1548 Handle<String> str_name = Handle<String>::cast(name);
1549 Handle<GlobalObject> global = Handle<GlobalObject>::cast(object); 1549 Handle<GlobalObject> global = Handle<GlobalObject>::cast(object);
1550 Handle<ScriptContextTable> script_contexts( 1550 Handle<ScriptContextTable> script_contexts(
1551 global->native_context()->script_context_table()); 1551 global->native_context()->script_context_table());
1552 1552
1553 ScriptContextTable::LookupResult lookup_result; 1553 ScriptContextTable::LookupResult lookup_result;
1554 if (ScriptContextTable::Lookup(script_contexts, str_name, &lookup_result)) { 1554 if (ScriptContextTable::Lookup(script_contexts, str_name, &lookup_result)) {
1555 Handle<Context> script_context = ScriptContextTable::GetContext( 1555 Handle<Context> script_context = ScriptContextTable::GetContext(
1556 script_contexts, lookup_result.context_index); 1556 script_contexts, lookup_result.context_index);
(...skipping 1507 matching lines...) Expand 10 before | Expand all | Expand 10 after
3064 static const Address IC_utilities[] = { 3064 static const Address IC_utilities[] = {
3065 #define ADDR(name) FUNCTION_ADDR(name), 3065 #define ADDR(name) FUNCTION_ADDR(name),
3066 IC_UTIL_LIST(ADDR) NULL 3066 IC_UTIL_LIST(ADDR) NULL
3067 #undef ADDR 3067 #undef ADDR
3068 }; 3068 };
3069 3069
3070 3070
3071 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } 3071 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; }
3072 } 3072 }
3073 } // namespace v8::internal 3073 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/messages.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698