| OLD | NEW |
| 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 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 InstallFunction(target, name, function, name_string, attributes); | 365 InstallFunction(target, name, function, name_string, attributes); |
| 366 } | 366 } |
| 367 | 367 |
| 368 Handle<JSFunction> InstallGetter(Handle<JSObject> target, | 368 Handle<JSFunction> InstallGetter(Handle<JSObject> target, |
| 369 Handle<Name> property_name, | 369 Handle<Name> property_name, |
| 370 Handle<JSFunction> getter, | 370 Handle<JSFunction> getter, |
| 371 PropertyAttributes attributes = DONT_ENUM) { | 371 PropertyAttributes attributes = DONT_ENUM) { |
| 372 Handle<Object> setter = target->GetIsolate()->factory()->undefined_value(); | 372 Handle<Object> setter = target->GetIsolate()->factory()->undefined_value(); |
| 373 JSObject::DefineAccessor(target, property_name, getter, setter, attributes) | 373 JSObject::DefineAccessor(target, property_name, getter, setter, attributes) |
| 374 .Check(); | 374 .Check(); |
| 375 getter->shared()->set_native(true); |
| 375 return getter; | 376 return getter; |
| 376 } | 377 } |
| 377 | 378 |
| 378 Handle<JSFunction> CreateFunction(Isolate* isolate, Handle<String> name, | 379 Handle<JSFunction> CreateFunction(Isolate* isolate, Handle<String> name, |
| 379 InstanceType type, int instance_size, | 380 InstanceType type, int instance_size, |
| 380 MaybeHandle<JSObject> maybe_prototype, | 381 MaybeHandle<JSObject> maybe_prototype, |
| 381 Builtins::Name call, | 382 Builtins::Name call, |
| 382 bool strict_function_map = false) { | 383 bool strict_function_map = false) { |
| 383 Factory* factory = isolate->factory(); | 384 Factory* factory = isolate->factory(); |
| 384 Handle<Code> call_code(isolate->builtins()->builtin(call)); | 385 Handle<Code> call_code(isolate->builtins()->builtin(call)); |
| (...skipping 3673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4058 } | 4059 } |
| 4059 | 4060 |
| 4060 | 4061 |
| 4061 // Called when the top-level V8 mutex is destroyed. | 4062 // Called when the top-level V8 mutex is destroyed. |
| 4062 void Bootstrapper::FreeThreadResources() { | 4063 void Bootstrapper::FreeThreadResources() { |
| 4063 DCHECK(!IsActive()); | 4064 DCHECK(!IsActive()); |
| 4064 } | 4065 } |
| 4065 | 4066 |
| 4066 } // namespace internal | 4067 } // namespace internal |
| 4067 } // namespace v8 | 4068 } // namespace v8 |
| OLD | NEW |