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

Side by Side Diff: src/bootstrapper.cc

Issue 788043005: ES6 unicode escapes, part 2: Regexps. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: mirror regexp test Created 5 years, 11 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 | src/heap/heap.h » ('j') | test/mjsunit/harmony/unicode-escapes-in-regexps.js » ('J')
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/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/extensions/externalize-string-extension.h" 9 #include "src/extensions/externalize-string-extension.h"
10 #include "src/extensions/free-buffer-extension.h" 10 #include "src/extensions/free-buffer-extension.h"
(...skipping 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after
1618 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrays) 1618 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrays)
1619 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_array_includes) 1619 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_array_includes)
1620 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_classes) 1620 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_classes)
1621 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_literals) 1621 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_literals)
1622 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions) 1622 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions)
1623 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_numeric_literals) 1623 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_numeric_literals)
1624 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tostring) 1624 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tostring)
1625 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies) 1625 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies)
1626 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_templates) 1626 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_templates)
1627 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy) 1627 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy)
1628 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode)
1629 1628
1630 void Genesis::InitializeGlobal_harmony_regexps() { 1629 void Genesis::InitializeGlobal_harmony_regexps() {
1631 Handle<JSObject> builtins(native_context()->builtins()); 1630 Handle<JSObject> builtins(native_context()->builtins());
1632 1631
1633 Handle<HeapObject> flag(FLAG_harmony_regexps ? heap()->true_value() 1632 Handle<HeapObject> flag(FLAG_harmony_regexps ? heap()->true_value()
1634 : heap()->false_value()); 1633 : heap()->false_value());
1635 PropertyAttributes attributes = 1634 PropertyAttributes attributes =
1636 static_cast<PropertyAttributes>(DONT_DELETE | READ_ONLY); 1635 static_cast<PropertyAttributes>(DONT_DELETE | READ_ONLY);
1637 Runtime::DefineObjectProperty(builtins, factory()->harmony_regexps_string(), 1636 Runtime::DefineObjectProperty(builtins, factory()->harmony_regexps_string(),
1638 flag, attributes).Assert(); 1637 flag, attributes).Assert();
1639 } 1638 }
1640 1639
1641 1640
1641 void Genesis::InitializeGlobal_harmony_unicode() {
1642 Handle<JSObject> builtins(native_context()->builtins());
1643
1644 Handle<HeapObject> flag(FLAG_harmony_unicode ? heap()->true_value()
1645 : heap()->false_value());
1646 PropertyAttributes attributes =
1647 static_cast<PropertyAttributes>(DONT_DELETE | READ_ONLY);
1648 Runtime::DefineObjectProperty(builtins, factory()->harmony_unicode_string(),
1649 flag, attributes).Assert();
1650 }
1651
1652
1642 Handle<JSFunction> Genesis::InstallInternalArray( 1653 Handle<JSFunction> Genesis::InstallInternalArray(
1643 Handle<JSBuiltinsObject> builtins, 1654 Handle<JSBuiltinsObject> builtins,
1644 const char* name, 1655 const char* name,
1645 ElementsKind elements_kind) { 1656 ElementsKind elements_kind) {
1646 // --- I n t e r n a l A r r a y --- 1657 // --- I n t e r n a l A r r a y ---
1647 // An array constructor on the builtins object that works like 1658 // An array constructor on the builtins object that works like
1648 // the public Array constructor, except that its prototype 1659 // the public Array constructor, except that its prototype
1649 // doesn't inherit from Object.prototype. 1660 // doesn't inherit from Object.prototype.
1650 // To be used only for internal work by builtins. Instances 1661 // To be used only for internal work by builtins. Instances
1651 // must not be leaked to user code. 1662 // must not be leaked to user code.
(...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after
2830 return from + sizeof(NestingCounterType); 2841 return from + sizeof(NestingCounterType);
2831 } 2842 }
2832 2843
2833 2844
2834 // Called when the top-level V8 mutex is destroyed. 2845 // Called when the top-level V8 mutex is destroyed.
2835 void Bootstrapper::FreeThreadResources() { 2846 void Bootstrapper::FreeThreadResources() {
2836 DCHECK(!IsActive()); 2847 DCHECK(!IsActive());
2837 } 2848 }
2838 2849
2839 } } // namespace v8::internal 2850 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/heap/heap.h » ('j') | test/mjsunit/harmony/unicode-escapes-in-regexps.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698