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

Side by Side Diff: src/bootstrapper.cc

Issue 2915793002: [api] Prototype WeakRef implementation
Patch Set: Created 3 years, 6 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/ast/ast-types.cc ('k') | src/compiler/types.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 "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 4007 matching lines...) Expand 10 before | Expand all | Expand 10 after
4018 handle(isolate()->builtins()->builtin(Builtins::kPromiseThrowerFinally), 4018 handle(isolate()->builtins()->builtin(Builtins::kPromiseThrowerFinally),
4019 isolate()); 4019 isolate());
4020 Handle<SharedFunctionInfo> info = factory()->NewSharedFunctionInfo( 4020 Handle<SharedFunctionInfo> info = factory()->NewSharedFunctionInfo(
4021 factory()->empty_string(), code, false); 4021 factory()->empty_string(), code, false);
4022 info->set_internal_formal_parameter_count(0); 4022 info->set_internal_formal_parameter_count(0);
4023 info->set_length(0); 4023 info->set_length(0);
4024 native_context()->set_promise_thrower_finally_shared_fun(*info); 4024 native_context()->set_promise_thrower_finally_shared_fun(*info);
4025 } 4025 }
4026 } 4026 }
4027 4027
4028 void Genesis::InitializeGlobal_harmony_weakref() {
4029 if (!FLAG_harmony_weakref) return;
4030
4031 Handle<JSFunction> js_weak_ref_fun = InstallFunction(
4032 global, "WeakRef", JS_WEAK_REF_TYPE, JSWeakRef::kSize,
4033 isolate->initial_object_prototype(), Builtins::kIllegal);
4034 InstallWithIntrinsicDefaultProto(isolate, js_weak_ref_fun,
4035 Context::JS_WEAK_REF_FUN_INDEX);
4036 }
4037
4028 void Genesis::InitializeGlobal_harmony_regexp_dotall() { 4038 void Genesis::InitializeGlobal_harmony_regexp_dotall() {
4029 if (!FLAG_harmony_regexp_dotall) return; 4039 if (!FLAG_harmony_regexp_dotall) return;
4030 4040
4031 Handle<JSFunction> constructor(native_context()->regexp_function()); 4041 Handle<JSFunction> constructor(native_context()->regexp_function());
4032 Handle<JSObject> prototype(JSObject::cast(constructor->instance_prototype())); 4042 Handle<JSObject> prototype(JSObject::cast(constructor->instance_prototype()));
4033 4043
4034 SimpleInstallGetter(prototype, isolate()->factory()->dotAll_string(), 4044 SimpleInstallGetter(prototype, isolate()->factory()->dotAll_string(),
4035 Builtins::kRegExpPrototypeDotAllGetter, true); 4045 Builtins::kRegExpPrototypeDotAllGetter, true);
4036 4046
4037 // The regexp prototype map has changed because we added a property 4047 // The regexp prototype map has changed because we added a property
(...skipping 1228 matching lines...) Expand 10 before | Expand all | Expand 10 after
5266 } 5276 }
5267 5277
5268 5278
5269 // Called when the top-level V8 mutex is destroyed. 5279 // Called when the top-level V8 mutex is destroyed.
5270 void Bootstrapper::FreeThreadResources() { 5280 void Bootstrapper::FreeThreadResources() {
5271 DCHECK(!IsActive()); 5281 DCHECK(!IsActive());
5272 } 5282 }
5273 5283
5274 } // namespace internal 5284 } // namespace internal
5275 } // namespace v8 5285 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/ast-types.cc ('k') | src/compiler/types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698