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

Side by Side Diff: src/bootstrapper.cc

Issue 567313003: RegExp: Add support for the ES6-proposed sticky flag (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add test of ^ behaviour in sticky regexp Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/compilation-cache.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/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 1399 matching lines...) Expand 10 before | Expand all | Expand 10 after
1410 *strict_generator_function_map); 1410 *strict_generator_function_map);
1411 1411
1412 Handle<JSFunction> object_function(native_context()->object_function()); 1412 Handle<JSFunction> object_function(native_context()->object_function());
1413 Handle<Map> generator_object_prototype_map = Map::Create( 1413 Handle<Map> generator_object_prototype_map = Map::Create(
1414 object_function, 0); 1414 object_function, 0);
1415 generator_object_prototype_map->set_prototype( 1415 generator_object_prototype_map->set_prototype(
1416 *generator_object_prototype); 1416 *generator_object_prototype);
1417 native_context()->set_generator_object_prototype_map( 1417 native_context()->set_generator_object_prototype_map(
1418 *generator_object_prototype_map); 1418 *generator_object_prototype_map);
1419 } 1419 }
1420 v8::Isolate* external_isolate = reinterpret_cast<v8::Isolate*>(isolate());
1421 v8::Local<v8::Boolean> flag = FLAG_harmony_regexps ?
1422 v8::True(external_isolate) :
1423 v8::False(external_isolate);
Yang 2014/09/17 07:16:14 Let's not unnecessarily use API handles. We can ju
Erik Corry 2014/09/17 17:06:19 Done.
1424 Handle<JSBuiltinsObject> builtins(native_context()->builtins());
1425 Runtime::DefineObjectProperty(builtins,
1426 factory()->InternalizeOneByteString(
1427 STATIC_CHAR_VECTOR("harmony_regexps")),
1428 Utils::OpenHandle(*flag), NONE).Assert();
1420 } 1429 }
1421 1430
1422 1431
1423 bool Genesis::CompileBuiltin(Isolate* isolate, int index) { 1432 bool Genesis::CompileBuiltin(Isolate* isolate, int index) {
1424 Vector<const char> name = Natives::GetScriptName(index); 1433 Vector<const char> name = Natives::GetScriptName(index);
1425 Handle<String> source_code = 1434 Handle<String> source_code =
1426 isolate->bootstrapper()->NativesSourceLookup(index); 1435 isolate->bootstrapper()->NativesSourceLookup(index);
1427 return CompileNative(isolate, name, source_code); 1436 return CompileNative(isolate, name, source_code);
1428 } 1437 }
1429 1438
(...skipping 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after
2725 return from + sizeof(NestingCounterType); 2734 return from + sizeof(NestingCounterType);
2726 } 2735 }
2727 2736
2728 2737
2729 // Called when the top-level V8 mutex is destroyed. 2738 // Called when the top-level V8 mutex is destroyed.
2730 void Bootstrapper::FreeThreadResources() { 2739 void Bootstrapper::FreeThreadResources() {
2731 DCHECK(!IsActive()); 2740 DCHECK(!IsActive());
2732 } 2741 }
2733 2742
2734 } } // namespace v8::internal 2743 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/compilation-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698