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

Side by Side Diff: src/bootstrapper.cc

Issue 2522543008: Merged: Squashed multiple commits. (Closed)
Patch Set: Created 4 years 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 | « no previous file | src/builtins/builtins.h » ('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/bootstrapper.h" 5 #include "src/bootstrapper.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api-natives.h" 8 #include "src/api-natives.h"
9 #include "src/base/ieee754.h" 9 #include "src/base/ieee754.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after
1210 Builtins::kFunctionPrototypeCall, 1, false); 1210 Builtins::kFunctionPrototypeCall, 1, false);
1211 SimpleInstallFunction(prototype, factory->toString_string(), 1211 SimpleInstallFunction(prototype, factory->toString_string(),
1212 Builtins::kFunctionPrototypeToString, 0, false); 1212 Builtins::kFunctionPrototypeToString, 0, false);
1213 1213
1214 // Install the @@hasInstance function. 1214 // Install the @@hasInstance function.
1215 Handle<JSFunction> has_instance = InstallFunction( 1215 Handle<JSFunction> has_instance = InstallFunction(
1216 prototype, factory->has_instance_symbol(), JS_OBJECT_TYPE, 1216 prototype, factory->has_instance_symbol(), JS_OBJECT_TYPE,
1217 JSObject::kHeaderSize, MaybeHandle<JSObject>(), 1217 JSObject::kHeaderSize, MaybeHandle<JSObject>(),
1218 Builtins::kFunctionPrototypeHasInstance, 1218 Builtins::kFunctionPrototypeHasInstance,
1219 static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE | READ_ONLY)); 1219 static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE | READ_ONLY));
1220 has_instance->shared()->set_builtin_function_id(kFunctionHasInstance);
1220 native_context()->set_function_has_instance(*has_instance); 1221 native_context()->set_function_has_instance(*has_instance);
1221 1222
1222 // Set the expected parameters for @@hasInstance to 1; required by builtin. 1223 // Set the expected parameters for @@hasInstance to 1; required by builtin.
1223 has_instance->shared()->set_internal_formal_parameter_count(1); 1224 has_instance->shared()->set_internal_formal_parameter_count(1);
1224 1225
1225 // Set the length for the function to satisfy ECMA-262. 1226 // Set the length for the function to satisfy ECMA-262.
1226 has_instance->shared()->set_length(1); 1227 has_instance->shared()->set_length(1);
1227 1228
1228 // Install the "constructor" property on the %FunctionPrototype%. 1229 // Install the "constructor" property on the %FunctionPrototype%.
1229 JSObject::AddProperty(prototype, factory->constructor_string(), 1230 JSObject::AddProperty(prototype, factory->constructor_string(),
(...skipping 2979 matching lines...) Expand 10 before | Expand all | Expand 10 after
4209 } 4210 }
4210 4211
4211 4212
4212 // Called when the top-level V8 mutex is destroyed. 4213 // Called when the top-level V8 mutex is destroyed.
4213 void Bootstrapper::FreeThreadResources() { 4214 void Bootstrapper::FreeThreadResources() {
4214 DCHECK(!IsActive()); 4215 DCHECK(!IsActive());
4215 } 4216 }
4216 4217
4217 } // namespace internal 4218 } // namespace internal
4218 } // namespace v8 4219 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/builtins/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698