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

Side by Side Diff: src/bootstrapper.cc

Issue 1863543002: Setting Symbol.length to 0 according to the spec (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | test/mjsunit/es6/symbols.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/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/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/extensions/externalize-string-extension.h" 10 #include "src/extensions/externalize-string-extension.h"
(...skipping 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after
1252 1252
1253 { 1253 {
1254 // --- S y m b o l --- 1254 // --- S y m b o l ---
1255 Handle<JSObject> prototype = 1255 Handle<JSObject> prototype =
1256 factory->NewJSObject(isolate->object_function(), TENURED); 1256 factory->NewJSObject(isolate->object_function(), TENURED);
1257 Handle<JSFunction> symbol_fun = 1257 Handle<JSFunction> symbol_fun =
1258 InstallFunction(global, "Symbol", JS_VALUE_TYPE, JSValue::kSize, 1258 InstallFunction(global, "Symbol", JS_VALUE_TYPE, JSValue::kSize,
1259 prototype, Builtins::kSymbolConstructor); 1259 prototype, Builtins::kSymbolConstructor);
1260 symbol_fun->shared()->set_construct_stub( 1260 symbol_fun->shared()->set_construct_stub(
1261 *isolate->builtins()->SymbolConstructor_ConstructStub()); 1261 *isolate->builtins()->SymbolConstructor_ConstructStub());
1262 symbol_fun->shared()->set_length(1); 1262 symbol_fun->shared()->set_length(0);
1263 symbol_fun->shared()->DontAdaptArguments(); 1263 symbol_fun->shared()->DontAdaptArguments();
1264 native_context()->set_symbol_function(*symbol_fun); 1264 native_context()->set_symbol_function(*symbol_fun);
1265 1265
1266 // Install the "constructor" property on the {prototype}. 1266 // Install the "constructor" property on the {prototype}.
1267 JSObject::AddProperty(prototype, factory->constructor_string(), symbol_fun, 1267 JSObject::AddProperty(prototype, factory->constructor_string(), symbol_fun,
1268 DONT_ENUM); 1268 DONT_ENUM);
1269 } 1269 }
1270 1270
1271 { // --- D a t e --- 1271 { // --- D a t e ---
1272 // Builtin functions for Date.prototype. 1272 // Builtin functions for Date.prototype.
(...skipping 2358 matching lines...) Expand 10 before | Expand all | Expand 10 after
3631 } 3631 }
3632 3632
3633 3633
3634 // Called when the top-level V8 mutex is destroyed. 3634 // Called when the top-level V8 mutex is destroyed.
3635 void Bootstrapper::FreeThreadResources() { 3635 void Bootstrapper::FreeThreadResources() {
3636 DCHECK(!IsActive()); 3636 DCHECK(!IsActive());
3637 } 3637 }
3638 3638
3639 } // namespace internal 3639 } // namespace internal
3640 } // namespace v8 3640 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/es6/symbols.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698