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

Side by Side Diff: src/bootstrapper.cc

Issue 231103002: Object::GetElements() and friends maybehandlification. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: FixedArray::UnionOfKeys() maybehandlified Created 6 years, 8 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/api.cc ('k') | src/builtins.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 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 "bootstrapper.h" 5 #include "bootstrapper.h"
6 6
7 #include "accessors.h" 7 #include "accessors.h"
8 #include "isolate-inl.h" 8 #include "isolate-inl.h"
9 #include "natives.h" 9 #include "natives.h"
10 #include "snapshot.h" 10 #include "snapshot.h"
(...skipping 2018 matching lines...) Expand 10 before | Expand all | Expand 10 after
2029 2029
2030 static Handle<JSObject> ResolveBuiltinIdHolder( 2030 static Handle<JSObject> ResolveBuiltinIdHolder(
2031 Handle<Context> native_context, 2031 Handle<Context> native_context,
2032 const char* holder_expr) { 2032 const char* holder_expr) {
2033 Isolate* isolate = native_context->GetIsolate(); 2033 Isolate* isolate = native_context->GetIsolate();
2034 Factory* factory = isolate->factory(); 2034 Factory* factory = isolate->factory();
2035 Handle<GlobalObject> global(native_context->global_object()); 2035 Handle<GlobalObject> global(native_context->global_object());
2036 const char* period_pos = strchr(holder_expr, '.'); 2036 const char* period_pos = strchr(holder_expr, '.');
2037 if (period_pos == NULL) { 2037 if (period_pos == NULL) {
2038 return Handle<JSObject>::cast(Object::GetPropertyOrElement( 2038 return Handle<JSObject>::cast(Object::GetPropertyOrElement(
2039 global, factory->InternalizeUtf8String(holder_expr))); 2039 global, factory->InternalizeUtf8String(holder_expr)).ToHandleChecked());
2040 } 2040 }
2041 ASSERT_EQ(".prototype", period_pos); 2041 ASSERT_EQ(".prototype", period_pos);
2042 Vector<const char> property(holder_expr, 2042 Vector<const char> property(holder_expr,
2043 static_cast<int>(period_pos - holder_expr)); 2043 static_cast<int>(period_pos - holder_expr));
2044 Handle<String> property_string = factory->InternalizeUtf8String(property); 2044 Handle<String> property_string = factory->InternalizeUtf8String(property);
2045 ASSERT(!property_string.is_null()); 2045 ASSERT(!property_string.is_null());
2046 Handle<JSFunction> function = Handle<JSFunction>::cast( 2046 Handle<JSFunction> function = Handle<JSFunction>::cast(
2047 Object::GetProperty(global, property_string)); 2047 Object::GetProperty(global, property_string));
2048 return Handle<JSObject>(JSObject::cast(function->prototype())); 2048 return Handle<JSObject>(JSObject::cast(function->prototype()));
2049 } 2049 }
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
2155 if (FLAG_expose_natives_as != NULL && strlen(FLAG_expose_natives_as) != 0) { 2155 if (FLAG_expose_natives_as != NULL && strlen(FLAG_expose_natives_as) != 0) {
2156 Handle<String> natives = 2156 Handle<String> natives =
2157 factory->InternalizeUtf8String(FLAG_expose_natives_as); 2157 factory->InternalizeUtf8String(FLAG_expose_natives_as);
2158 RETURN_ON_EXCEPTION_VALUE( 2158 RETURN_ON_EXCEPTION_VALUE(
2159 isolate, 2159 isolate,
2160 JSObject::SetLocalPropertyIgnoreAttributes( 2160 JSObject::SetLocalPropertyIgnoreAttributes(
2161 global, natives, Handle<JSObject>(global->builtins()), DONT_ENUM), 2161 global, natives, Handle<JSObject>(global->builtins()), DONT_ENUM),
2162 false); 2162 false);
2163 } 2163 }
2164 2164
2165 Handle<Object> Error = GetProperty(global, "Error"); 2165 Handle<Object> Error = GetProperty(global, "Error").ToHandleChecked();
2166 if (Error->IsJSObject()) { 2166 if (Error->IsJSObject()) {
2167 Handle<String> name = factory->InternalizeOneByteString( 2167 Handle<String> name = factory->InternalizeOneByteString(
2168 STATIC_ASCII_VECTOR("stackTraceLimit")); 2168 STATIC_ASCII_VECTOR("stackTraceLimit"));
2169 Handle<Smi> stack_trace_limit( 2169 Handle<Smi> stack_trace_limit(
2170 Smi::FromInt(FLAG_stack_trace_limit), isolate); 2170 Smi::FromInt(FLAG_stack_trace_limit), isolate);
2171 RETURN_ON_EXCEPTION_VALUE( 2171 RETURN_ON_EXCEPTION_VALUE(
2172 isolate, 2172 isolate,
2173 JSObject::SetLocalPropertyIgnoreAttributes( 2173 JSObject::SetLocalPropertyIgnoreAttributes(
2174 Handle<JSObject>::cast(Error), name, stack_trace_limit, NONE), 2174 Handle<JSObject>::cast(Error), name, stack_trace_limit, NONE),
2175 false); 2175 false);
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
2718 return from + sizeof(NestingCounterType); 2718 return from + sizeof(NestingCounterType);
2719 } 2719 }
2720 2720
2721 2721
2722 // Called when the top-level V8 mutex is destroyed. 2722 // Called when the top-level V8 mutex is destroyed.
2723 void Bootstrapper::FreeThreadResources() { 2723 void Bootstrapper::FreeThreadResources() {
2724 ASSERT(!IsActive()); 2724 ASSERT(!IsActive());
2725 } 2725 }
2726 2726
2727 } } // namespace v8::internal 2727 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/builtins.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698