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

Side by Side Diff: test/cctest/test-compiler.cc

Issue 564035: Remove lazy loading of natives files and the natives cache.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/partial_snapshots/
Patch Set: Created 10 years, 10 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 | « test/cctest/test-api.cc ('k') | test/cctest/test-serialize.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 static void SetGlobalProperty(const char* name, Object* value) { 107 static void SetGlobalProperty(const char* name, Object* value) {
108 Handle<Object> object(value); 108 Handle<Object> object(value);
109 Handle<String> symbol = Factory::LookupAsciiSymbol(name); 109 Handle<String> symbol = Factory::LookupAsciiSymbol(name);
110 Handle<JSObject> global(Top::context()->global()); 110 Handle<JSObject> global(Top::context()->global());
111 SetProperty(global, symbol, object, NONE); 111 SetProperty(global, symbol, object, NONE);
112 } 112 }
113 113
114 114
115 static Handle<JSFunction> Compile(const char* source) { 115 static Handle<JSFunction> Compile(const char* source) {
116 Handle<String> source_code(Factory::NewStringFromUtf8(CStrVector(source))); 116 Handle<String> source_code(Factory::NewStringFromUtf8(CStrVector(source)));
117 Handle<JSFunction> boilerplate = 117 Handle<JSFunction> boilerplate = Compiler::Compile(source_code,
118 Compiler::Compile(source_code, Handle<String>(), 0, 0, NULL, NULL); 118 Handle<String>(),
119 0,
120 0,
121 NULL,
122 NULL,
123 NOT_NATIVES_CODE);
119 return Factory::NewFunctionFromBoilerplate(boilerplate, 124 return Factory::NewFunctionFromBoilerplate(boilerplate,
120 Top::global_context()); 125 Top::global_context());
121 } 126 }
122 127
123 128
124 static double Inc(int x) { 129 static double Inc(int x) {
125 const char* source = "result = %d + 1;"; 130 const char* source = "result = %d + 1;";
126 EmbeddedVector<char, 512> buffer; 131 EmbeddedVector<char, 512> buffer;
127 OS::SNPrintF(buffer, source, x); 132 OS::SNPrintF(buffer, source, x);
128 133
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 TEST(Regression236) { 315 TEST(Regression236) {
311 InitializeVM(); 316 InitializeVM();
312 v8::HandleScope scope; 317 v8::HandleScope scope;
313 318
314 Handle<Script> script = Factory::NewScript(Factory::empty_string()); 319 Handle<Script> script = Factory::NewScript(Factory::empty_string());
315 script->set_source(Heap::undefined_value()); 320 script->set_source(Heap::undefined_value());
316 CHECK_EQ(-1, GetScriptLineNumber(script, 0)); 321 CHECK_EQ(-1, GetScriptLineNumber(script, 0));
317 CHECK_EQ(-1, GetScriptLineNumber(script, 100)); 322 CHECK_EQ(-1, GetScriptLineNumber(script, 100));
318 CHECK_EQ(-1, GetScriptLineNumber(script, -1)); 323 CHECK_EQ(-1, GetScriptLineNumber(script, -1));
319 } 324 }
OLDNEW
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/cctest/test-serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698