Lines Matching refs:Code
6 // * Redistributions of source code must retain the above copyright
101 static void ExpectString(const char* code, const char* expected) {
102 Local<Value> result = CompileRun(code);
109 static void ExpectInt32(const char* code, int expected) {
110 Local<Value> result = CompileRun(code);
116 static void ExpectBoolean(const char* code, bool expected) {
117 Local<Value> result = CompileRun(code);
123 static void ExpectTrue(const char* code) {
124 ExpectBoolean(code, true);
128 static void ExpectFalse(const char* code) {
129 ExpectBoolean(code, false);
133 static void ExpectObject(const char* code, Local<Value> expected) {
134 Local<Value> result = CompileRun(code);
139 static void ExpectUndefined(const char* code) {
140 Local<Value> result = CompileRun(code);
1384 // The code will not be run in that case, due to the "if" guard.
2089 const char* code = "var str = 'oddle'; obj[str] + obj.poddle;";
2090 v8::Handle<Value> str = CompileRun(code);
2542 // code is based on the address.
2550 // objects should not be assigned the same hash code. If the test below fails
5261 // code). Then force object with a named interceptor into slow-case,
5429 // Make sure that the the interceptor code in the runtime properly handles
5485 // Make sure that the the interceptor code in the runtime properly handles
5542 const char* code =
5553 ExpectString(code, "PASSED");
5567 const char* code =
5577 ExpectString(code, "PASSED");
5591 const char* code =
5607 ExpectString(code, "PASSED");
5620 const char* code =
5630 ExpectString(code, "PASSED");
5643 const char* code =
5669 ExpectString(code, "PASSED");
5682 const char* code =
5698 ExpectString(code, "PASSED");
5711 const char* code =
5728 ExpectString(code, "PASSED");
5741 const char* code =
5758 ExpectString(code, "PASSED");
5771 const char* code =
5782 ExpectString(code, "PASSED");
6352 // Syntax error in extension code.
6366 // Syntax error in extension code - escape code in "native" means that
6634 const char* code =
6643 v8::Handle<Value> result = CompileRun(code);
7926 // to make sure to exercise the IC code.
7938 // that. Repeat in a loop to make sure to exercise the IC code.
8269 // Add an accessor accessible by cross-domain JS code.
8276 // Add an accessor that is not accessible by cross-domain JS code.
8520 // Add an accessor that is not accessible by cross-domain JS code.
8698 // Add an accessor to proto that's accessible by cross-domain JS code.
8704 // Add an accessor that is not accessible by cross-domain JS code.
9152 // CallIC_Miss code path that can't cope with global proxy.
9868 // when evaluting code.
9875 // code.
10862 // Same test as above, except the code is wrapped in a function
11916 // external code.
12304 const char* code = "throw 7;";
12310 v8::Handle<Value> value = CompileRun(code);
12327 const char* code = "throw 7;";
12331 v8::Handle<Value> value = CompileRun(code);
12757 // We would like to never see code move that we haven't seen before,
12758 // but the code creation event does not happen until the line endings
12762 // calculations can cause a GC, which can move the newly created code
12782 // Get the function's code object.
12783 i::Code* function_code = i::Code::GetCodeFromTargetAddress(
12787 // Then try and look up the caller's code object.
12796 if (!bar_func_.is_null() && function_code == bar_func_->code()) {
12803 if (!foo_func_.is_null() && function_code == foo_func_->code()) {
13042 // We would like to never see code move that we haven't seen before,
13043 // but the code creation event does not happen until the line endings
13047 // calculations can cause a GC, which can move the newly created code
13067 // Object/code removal events are currently not dispatched from the GC.
13129 // have remnants of state from other code.
13135 i::HashMap code(MatchPointers);
13136 code_map = &code;
13146 // Generate new code objects sparsely distributed across several
13147 // different fragmented code-space pages.
13155 // Keep a strong reference to the code object in the handle scope.
13156 i::Handle<i::Code> bar_code(i::Handle<i::JSFunction>::cast(
13157 v8::Utils::OpenHandle(*env->Global()->Get(v8_str("bar"))))->code());
13158 i::Handle<i::Code> foo_code(i::Handle<i::JSFunction>::cast(
13159 v8::Utils::OpenHandle(*env->Global()->Get(v8_str("foo"))))->code());
13165 // Force code movement.
13184 // Verify that we get callbacks for existing code objects when we
13185 // request enumeration of existing code.
13191 // Now get code through initial iteration.
13192 i::HashMap code(MatchPointers);
13193 code_map = &code;
13202 // We expect that we got some events. Note that if we could get code removal
13206 CHECK_LT(0, code.occupancy());
13913 // arise because we share code between contexts via the compilation
14874 // See http://code.google.com/p/v8/issues/detail?id=398
15110 // http://code.google.com/p/chromium/issues/detail?id=26337.
15770 // The goal of the code below is to make "offset" large enough
16564 i::ScopedVector<char> code(1024);
16565 i::OS::SNPrintF(code, source, "//# sourceURL=eval_url");
16566 CHECK(CompileRun(code.start())->IsUndefined());
16567 i::OS::SNPrintF(code, source, "//@ sourceURL=eval_url");
16568 CHECK(CompileRun(code.start())->IsUndefined());
16609 i::ScopedVector<char> code(1024);
16610 i::OS::SNPrintF(code, source, "//# sourceURL=source_url");
16611 CHECK(CompileRunWithOrigin(code
16612 i::OS::SNPrintF(code, source, "//@ sourceURL=source_url");
16613 CHECK(CompileRunWithOrigin(code.start(), "url", 0, 1)->IsUndefined());
16654 i::ScopedVector<char> code(1024);
16655 i::OS::SNPrintF(code, source, "//# sourceURL=source_url");
16656 CHECK(CompileRunWithOrigin(code.start(), "url", 0, 0)->IsUndefined());
16657 i::OS::SNPrintF(code, source, "//@ sourceURL=source_url");
16658 CHECK(CompileRunWithOrigin(code.start(), "url", 0, 0)->IsUndefined());
17087 // Create a context used to keep the code from aging in the compilation
17394 // This compile will add the code to the compilation cache.
17413 // This compile will get the code from the compilation cache.
17490 const char* code =
17505 ExpectString(code, "PASSED");
17516 const char* code =
17528 ExpectString(code, "PASSED");
17537 const char* code =
17552 ExpectString(code, "PASSED");
17561 const char* code =
17576 ExpectString(code, "PASSED");
17585 const char* code =
17593 ExpectString(code, "PASSED");
17886 // Run some V8 code to trigger default isolate to become 'current'.
18090 i::ScopedVector<char> code(1024);
18091 i::OS::SNPrintF(code, "function fib(n) {"
18096 Local<Value> value = CompileRun(code.start());
18271 const char* code =
18275 // Run the code twice in the first context to initialize the call IC.
18278 ExpectString(code, "a");
18279 ExpectString(code, "a");
18288 ExpectString(code, "not a");
18294 const char* code =
18298 // Run the code twice in the first context to initialize the call IC.
18301 ExpectString(code, "42");
18302 ExpectString(code, "42");
18311 ExpectString(code, "not 42");
18317 const char* code =
18321 // Run the code twice in the first context to initialize the call IC.
18324 ExpectString(code, "true");
18325 ExpectString(code, "true");
18334 ExpectString(code, "");
18344 // Run the code twice in the first context to initialize the load
18383 // Run the code twice to initialize the load IC for a don't delete
18393 // Delete the cell using the API and check the inlined code works
18411 // Run the code twice to initialize the load IC for a don't delete
18421 // Delete the cell using the API and check the inlined code works
18956 // Set a callback that disallows the code generation.
19178 const char* code) {
19179 Local<Value> result = CompileRun(code);
19532 // Test path through generic runtime code.
19554 // Test path through optimized code.
19779 // so that it does not share code with the first version. This