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

Side by Side Diff: src/runtime/runtime-scopes.cc

Issue 722723002: Move public symbols to the root set. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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/parser.cc ('k') | src/symbol.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/arguments.h" 8 #include "src/arguments.h"
9 #include "src/frames-inl.h" 9 #include "src/frames-inl.h"
10 #include "src/runtime/runtime-utils.h" 10 #include "src/runtime/runtime-utils.h"
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 // Try to convert the key to an index. If successful and within 999 // Try to convert the key to an index. If successful and within
1000 // index return the the argument from the frame. 1000 // index return the the argument from the frame.
1001 uint32_t index; 1001 uint32_t index;
1002 if (raw_key->ToArrayIndex(&index) && index < n) { 1002 if (raw_key->ToArrayIndex(&index) && index < n) {
1003 return frame->GetParameter(index); 1003 return frame->GetParameter(index);
1004 } 1004 }
1005 1005
1006 HandleScope scope(isolate); 1006 HandleScope scope(isolate);
1007 if (raw_key->IsSymbol()) { 1007 if (raw_key->IsSymbol()) {
1008 Handle<Symbol> symbol = Handle<Symbol>::cast(raw_key); 1008 Handle<Symbol> symbol = Handle<Symbol>::cast(raw_key);
1009 if (symbol->Equals(isolate->native_context()->iterator_symbol())) { 1009 if (Name::Equals(symbol, isolate->factory()->iterator_symbol())) {
1010 return isolate->native_context()->array_values_iterator(); 1010 return isolate->native_context()->array_values_iterator();
1011 } 1011 }
1012 // Lookup in the initial Object.prototype object. 1012 // Lookup in the initial Object.prototype object.
1013 Handle<Object> result; 1013 Handle<Object> result;
1014 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 1014 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
1015 isolate, result, 1015 isolate, result,
1016 Object::GetProperty(isolate->initial_object_prototype(), 1016 Object::GetProperty(isolate->initial_object_prototype(),
1017 Handle<Symbol>::cast(raw_key))); 1017 Handle<Symbol>::cast(raw_key)));
1018 return *result; 1018 return *result;
1019 } 1019 }
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 return Smi::FromInt(frame->GetArgumentsLength()); 1069 return Smi::FromInt(frame->GetArgumentsLength());
1070 } 1070 }
1071 1071
1072 1072
1073 RUNTIME_FUNCTION(RuntimeReference_Arguments) { 1073 RUNTIME_FUNCTION(RuntimeReference_Arguments) {
1074 SealHandleScope shs(isolate); 1074 SealHandleScope shs(isolate);
1075 return __RT_impl_Runtime_GetArgumentsProperty(args, isolate); 1075 return __RT_impl_Runtime_GetArgumentsProperty(args, isolate);
1076 } 1076 }
1077 } 1077 }
1078 } // namespace v8::internal 1078 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/parser.cc ('k') | src/symbol.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698