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

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

Issue 441273002: Reland "Make --always-opt also optimize toplevel code." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Well, yeah. Created 6 years, 4 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 | « src/x64/lithium-codegen-x64.cc ('k') | test/cctest/test-debug.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 // 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 5347 matching lines...) Expand 10 before | Expand all | Expand 10 after
5358 5358
5359 5359
5360 void TryCatchMixedNestingCheck(v8::TryCatch* try_catch) { 5360 void TryCatchMixedNestingCheck(v8::TryCatch* try_catch) {
5361 CHECK(try_catch->HasCaught()); 5361 CHECK(try_catch->HasCaught());
5362 Handle<Message> message = try_catch->Message(); 5362 Handle<Message> message = try_catch->Message();
5363 Handle<Value> resource = message->GetScriptOrigin().ResourceName(); 5363 Handle<Value> resource = message->GetScriptOrigin().ResourceName();
5364 CHECK_EQ(0, strcmp(*v8::String::Utf8Value(resource), "inner")); 5364 CHECK_EQ(0, strcmp(*v8::String::Utf8Value(resource), "inner"));
5365 CHECK_EQ(0, strcmp(*v8::String::Utf8Value(message->Get()), 5365 CHECK_EQ(0, strcmp(*v8::String::Utf8Value(message->Get()),
5366 "Uncaught Error: a")); 5366 "Uncaught Error: a"));
5367 CHECK_EQ(1, message->GetLineNumber()); 5367 CHECK_EQ(1, message->GetLineNumber());
5368 CHECK_EQ(6, message->GetStartColumn()); 5368 // TODO(mstarzinger): Our compilers disagree about the position.
5369 CHECK_EQ(i::FLAG_always_opt ? 0 : 6, message->GetStartColumn());
5369 } 5370 }
5370 5371
5371 5372
5372 void TryCatchMixedNestingHelper( 5373 void TryCatchMixedNestingHelper(
5373 const v8::FunctionCallbackInfo<v8::Value>& args) { 5374 const v8::FunctionCallbackInfo<v8::Value>& args) {
5374 ApiTestFuzzer::Fuzz(); 5375 ApiTestFuzzer::Fuzz();
5375 v8::TryCatch try_catch; 5376 v8::TryCatch try_catch;
5376 CompileRunWithOrigin("throw new Error('a');\n", "inner", 0, 0); 5377 CompileRunWithOrigin("throw new Error('a');\n", "inner", 0, 0);
5377 CHECK(try_catch.HasCaught()); 5378 CHECK(try_catch.HasCaught());
5378 TryCatchMixedNestingCheck(&try_catch); 5379 TryCatchMixedNestingCheck(&try_catch);
(...skipping 17457 matching lines...) Expand 10 before | Expand all | Expand 10 after
22836 desc = x->GetOwnPropertyDescriptor(v8_str("p1")); 22837 desc = x->GetOwnPropertyDescriptor(v8_str("p1"));
22837 Local<Function> set = 22838 Local<Function> set =
22838 Local<Function>::Cast(Local<Object>::Cast(desc)->Get(v8_str("set"))); 22839 Local<Function>::Cast(Local<Object>::Cast(desc)->Get(v8_str("set")));
22839 Local<Function> get = 22840 Local<Function> get =
22840 Local<Function>::Cast(Local<Object>::Cast(desc)->Get(v8_str("get"))); 22841 Local<Function>::Cast(Local<Object>::Cast(desc)->Get(v8_str("get")));
22841 CHECK_EQ(v8_num(13), get->Call(x, 0, NULL)); 22842 CHECK_EQ(v8_num(13), get->Call(x, 0, NULL));
22842 Handle<Value> args[] = { v8_num(14) }; 22843 Handle<Value> args[] = { v8_num(14) };
22843 set->Call(x, 1, args); 22844 set->Call(x, 1, args);
22844 CHECK_EQ(v8_num(14), get->Call(x, 0, NULL)); 22845 CHECK_EQ(v8_num(14), get->Call(x, 0, NULL));
22845 } 22846 }
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698