OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 #include <cstdlib> | 28 #include <cstdlib> |
29 #include <memory> | 29 #include <memory> |
30 #include <sstream> | 30 #include <sstream> |
31 | 31 |
32 #include "include/v8.h" | 32 #include "include/v8.h" |
33 #include "src/v8.h" | 33 #include "src/v8.h" |
34 | 34 |
35 #include "src/ast/ast.h" | 35 #include "src/ast/ast.h" |
36 #include "src/char-predicates-inl.h" | 36 #include "src/char-predicates-inl.h" |
| 37 #include "src/objects-inl.h" |
37 #include "src/ostreams.h" | 38 #include "src/ostreams.h" |
38 #include "src/regexp/jsregexp.h" | 39 #include "src/regexp/jsregexp.h" |
| 40 #include "src/regexp/regexp-macro-assembler-irregexp.h" |
39 #include "src/regexp/regexp-macro-assembler.h" | 41 #include "src/regexp/regexp-macro-assembler.h" |
40 #include "src/regexp/regexp-macro-assembler-irregexp.h" | |
41 #include "src/regexp/regexp-parser.h" | 42 #include "src/regexp/regexp-parser.h" |
42 #include "src/splay-tree-inl.h" | 43 #include "src/splay-tree-inl.h" |
43 #include "src/string-stream.h" | 44 #include "src/string-stream.h" |
44 #ifdef V8_INTERPRETED_REGEXP | 45 #ifdef V8_INTERPRETED_REGEXP |
45 #include "src/regexp/interpreter-irregexp.h" | 46 #include "src/regexp/interpreter-irregexp.h" |
46 #else // V8_INTERPRETED_REGEXP | 47 #else // V8_INTERPRETED_REGEXP |
47 #include "src/macro-assembler.h" | 48 #include "src/macro-assembler.h" |
48 #if V8_TARGET_ARCH_ARM | 49 #if V8_TARGET_ARCH_ARM |
49 #include "src/arm/assembler-arm.h" // NOLINT | 50 #include "src/arm/assembler-arm.h" // NOLINT |
50 #include "src/arm/macro-assembler-arm.h" | 51 #include "src/arm/macro-assembler-arm.h" |
(...skipping 1973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2024 v8::Local<v8::String> external = | 2025 v8::Local<v8::String> external = |
2025 v8::String::NewExternalOneByte(isolate, new UncachedExternalString()) | 2026 v8::String::NewExternalOneByte(isolate, new UncachedExternalString()) |
2026 .ToLocalChecked(); | 2027 .ToLocalChecked(); |
2027 CHECK(v8::Utils::OpenHandle(*external)->map() == | 2028 CHECK(v8::Utils::OpenHandle(*external)->map() == |
2028 CcTest::i_isolate()->heap()->short_external_one_byte_string_map()); | 2029 CcTest::i_isolate()->heap()->short_external_one_byte_string_map()); |
2029 v8::Local<v8::Object> global = env->Global(); | 2030 v8::Local<v8::Object> global = env->Global(); |
2030 global->Set(env.local(), v8_str("external"), external).FromJust(); | 2031 global->Set(env.local(), v8_str("external"), external).FromJust(); |
2031 CompileRun("var re = /y(.)/; re.test('ab');"); | 2032 CompileRun("var re = /y(.)/; re.test('ab');"); |
2032 ExpectString("external.substring(1).match(re)[1]", "z"); | 2033 ExpectString("external.substring(1).match(re)[1]", "z"); |
2033 } | 2034 } |
OLD | NEW |