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

Unified Diff: src/bootstrapper.cc

Issue 2409513003: [regexp] Port remaining JS functions in regexp.js (Closed)
Patch Set: Format and Rebaseline Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/builtins/builtins.h » ('j') | src/builtins/builtins.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index ff12defefb3b4c2c448cc2baee863dcce7c4ebc4..9cfd627e4533d95a294855fdb418f1345fb087e6 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1865,6 +1865,51 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
initial_map->set_unused_property_fields(0);
initial_map->set_instance_size(initial_map->instance_size() +
num_fields * kPointerSize);
+
+ { // Internal: RegExpInitialize
+ Handle<JSFunction> function = isolate->factory()->NewFunction(
+ isolate->factory()->empty_string(),
+ isolate->builtins()->RegExpInitialize(), JS_OBJECT_TYPE,
+ JSObject::kHeaderSize);
+ function->shared()->DontAdaptArguments();
+ function->shared()->set_length(3);
+ function->shared()->set_native(true);
+ isolate->native_context()->set(Context::REGEXP_INITIALIZE, *function);
+ }
+
+ { // Internal: RegExpIsRegExp
+ Handle<JSFunction> function = isolate->factory()->NewFunction(
+ isolate->factory()->empty_string(),
+ isolate->builtins()->RegExpIsRegExp(), JS_OBJECT_TYPE,
+ JSObject::kHeaderSize);
+ function->shared()->DontAdaptArguments();
+ function->shared()->set_length(1);
+ function->shared()->set_native(true);
+ isolate->native_context()->set(Context::REGEXP_IS_REGEXP, *function);
+ }
+
+ { // Internal: RegExpInternalMatch
+ Handle<JSFunction> function =
+ factory->NewFunction(isolate->factory()->empty_string(),
+ isolate->builtins()->RegExpInternalMatch(),
+ JS_OBJECT_TYPE, JSObject::kHeaderSize);
+ function->shared()->set_internal_formal_parameter_count(2);
+ function->shared()->set_length(2);
+ function->shared()->set_native(true);
+ isolate->native_context()->set(Context::REGEXP_INTERNAL_MATCH, *function);
+ }
+
+ { // Internal: RegExpInternalReplace
+ Handle<JSFunction> function = isolate->factory()->NewFunction(
+ isolate->factory()->empty_string(),
+ isolate->builtins()->RegExpInternalReplace(), JS_OBJECT_TYPE,
+ JSObject::kHeaderSize);
+ function->shared()->set_internal_formal_parameter_count(3);
+ function->shared()->set_length(3);
+ function->shared()->set_native(true);
+ isolate->native_context()->set(Context::REGEXP_INTERNAL_REPLACE,
+ *function);
+ }
}
{ // -- E r r o r
« no previous file with comments | « no previous file | src/builtins/builtins.h » ('j') | src/builtins/builtins.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698