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

Side by Side Diff: test/cctest/test-api.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/cctest.status ('k') | test/cctest/test-compiler.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 2007-2009 the V8 project authors. All rights reserved. 1 // Copyright 2007-2009 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 20 matching lines...) Expand all
31 31
32 #include "api.h" 32 #include "api.h"
33 #include "compilation-cache.h" 33 #include "compilation-cache.h"
34 #include "execution.h" 34 #include "execution.h"
35 #include "snapshot.h" 35 #include "snapshot.h"
36 #include "platform.h" 36 #include "platform.h"
37 #include "top.h" 37 #include "top.h"
38 #include "utils.h" 38 #include "utils.h"
39 #include "cctest.h" 39 #include "cctest.h"
40 40
41 static const bool kLogThreading = false; 41 static const bool kLogThreading = true;
42 42
43 static bool IsNaN(double x) { 43 static bool IsNaN(double x) {
44 #ifdef WIN32 44 #ifdef WIN32
45 return _isnan(x); 45 return _isnan(x);
46 #else 46 #else
47 return isnan(x); 47 return isnan(x);
48 #endif 48 #endif
49 } 49 }
50 50
51 using ::v8::ObjectTemplate; 51 using ::v8::ObjectTemplate;
(...skipping 4921 matching lines...) Expand 10 before | Expand all | Expand 10 after
4973 4973
4974 // Trigger lazy loading in other context. 4974 // Trigger lazy loading in other context.
4975 Local<Script> script = 4975 Local<Script> script =
4976 Script::Compile(v8_str("other.eval('new Date(42)')")); 4976 Script::Compile(v8_str("other.eval('new Date(42)')"));
4977 Local<Value> value = script->Run(); 4977 Local<Value> value = script->Run();
4978 CHECK_EQ(42.0, value->NumberValue()); 4978 CHECK_EQ(42.0, value->NumberValue());
4979 } 4979 }
4980 4980
4981 4981
4982 static v8::Handle<Value> call_as_function(const v8::Arguments& args) { 4982 static v8::Handle<Value> call_as_function(const v8::Arguments& args) {
4983 ApiTestFuzzer::Fuzz(); 4983 //ApiTestFuzzer::Fuzz();
4984 if (args.IsConstructCall()) { 4984 if (args.IsConstructCall()) {
4985 if (args[0]->IsInt32()) { 4985 if (args[0]->IsInt32()) {
4986 return v8_num(-args[0]->Int32Value()); 4986 return v8_num(-args[0]->Int32Value());
4987 } 4987 }
4988 } 4988 }
4989 4989
4990 return args[0]; 4990 return args[0];
4991 } 4991 }
4992 4992
4993 4993
(...skipping 3828 matching lines...) Expand 10 before | Expand all | Expand 10 after
8822 CompileRun(source_exception); 8822 CompileRun(source_exception);
8823 other_context->Exit(); 8823 other_context->Exit();
8824 v8::internal::Heap::CollectAllGarbage(false); 8824 v8::internal::Heap::CollectAllGarbage(false);
8825 if (GetGlobalObjectsCount() == 1) break; 8825 if (GetGlobalObjectsCount() == 1) break;
8826 } 8826 }
8827 CHECK_GE(2, gc_count); 8827 CHECK_GE(2, gc_count);
8828 CHECK_EQ(1, GetGlobalObjectsCount()); 8828 CHECK_EQ(1, GetGlobalObjectsCount());
8829 8829
8830 other_context.Dispose(); 8830 other_context.Dispose();
8831 } 8831 }
OLDNEW
« no previous file with comments | « test/cctest/cctest.status ('k') | test/cctest/test-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698