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

Side by Side Diff: src/api.cc

Issue 1432683002: Revert of Implement flag and source getters on RegExp.prototype. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@rproto
Patch Set: Created 5 years, 1 month 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 | « include/v8.h ('k') | src/bootstrapper.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/api.h" 5 #include "src/api.h"
6 6
7 #include <string.h> // For memcpy, strlen. 7 #include <string.h> // For memcpy, strlen.
8 #ifdef V8_USE_ADDRESS_SANITIZER 8 #ifdef V8_USE_ADDRESS_SANITIZER
9 #include <sanitizer/asan_interface.h> 9 #include <sanitizer/asan_interface.h>
10 #endif // V8_USE_ADDRESS_SANITIZER 10 #endif // V8_USE_ADDRESS_SANITIZER
(...skipping 6129 matching lines...) Expand 10 before | Expand all | Expand 10 after
6140 6140
6141 6141
6142 // Assert that the static flags cast in GetFlags is valid. 6142 // Assert that the static flags cast in GetFlags is valid.
6143 #define REGEXP_FLAG_ASSERT_EQ(api_flag, internal_flag) \ 6143 #define REGEXP_FLAG_ASSERT_EQ(api_flag, internal_flag) \
6144 STATIC_ASSERT(static_cast<int>(v8::RegExp::api_flag) == \ 6144 STATIC_ASSERT(static_cast<int>(v8::RegExp::api_flag) == \
6145 static_cast<int>(i::JSRegExp::internal_flag)) 6145 static_cast<int>(i::JSRegExp::internal_flag))
6146 REGEXP_FLAG_ASSERT_EQ(kNone, NONE); 6146 REGEXP_FLAG_ASSERT_EQ(kNone, NONE);
6147 REGEXP_FLAG_ASSERT_EQ(kGlobal, GLOBAL); 6147 REGEXP_FLAG_ASSERT_EQ(kGlobal, GLOBAL);
6148 REGEXP_FLAG_ASSERT_EQ(kIgnoreCase, IGNORE_CASE); 6148 REGEXP_FLAG_ASSERT_EQ(kIgnoreCase, IGNORE_CASE);
6149 REGEXP_FLAG_ASSERT_EQ(kMultiline, MULTILINE); 6149 REGEXP_FLAG_ASSERT_EQ(kMultiline, MULTILINE);
6150 REGEXP_FLAG_ASSERT_EQ(kSticky, STICKY);
6151 REGEXP_FLAG_ASSERT_EQ(kUnicode, UNICODE_ESCAPES);
6152 #undef REGEXP_FLAG_ASSERT_EQ 6150 #undef REGEXP_FLAG_ASSERT_EQ
6153 6151
6154 v8::RegExp::Flags v8::RegExp::GetFlags() const { 6152 v8::RegExp::Flags v8::RegExp::GetFlags() const {
6155 i::Handle<i::JSRegExp> obj = Utils::OpenHandle(this); 6153 i::Handle<i::JSRegExp> obj = Utils::OpenHandle(this);
6156 return static_cast<RegExp::Flags>(obj->GetFlags().value()); 6154 return static_cast<RegExp::Flags>(obj->GetFlags().value());
6157 } 6155 }
6158 6156
6159 6157
6160 Local<v8::Array> v8::Array::New(Isolate* isolate, int length) { 6158 Local<v8::Array> v8::Array::New(Isolate* isolate, int length) {
6161 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); 6159 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
(...skipping 2357 matching lines...) Expand 10 before | Expand all | Expand 10 after
8519 Address callback_address = 8517 Address callback_address =
8520 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 8518 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
8521 VMState<EXTERNAL> state(isolate); 8519 VMState<EXTERNAL> state(isolate);
8522 ExternalCallbackScope call_scope(isolate, callback_address); 8520 ExternalCallbackScope call_scope(isolate, callback_address);
8523 callback(info); 8521 callback(info);
8524 } 8522 }
8525 8523
8526 8524
8527 } // namespace internal 8525 } // namespace internal
8528 } // namespace v8 8526 } // namespace v8
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698