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

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

Issue 429583002: Revert "Make --always-opt also optimize toplevel code." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 5351 matching lines...) Expand 10 before | Expand all | Expand 10 after
5362 5362
5363 5363
5364 void TryCatchMixedNestingCheck(v8::TryCatch* try_catch) { 5364 void TryCatchMixedNestingCheck(v8::TryCatch* try_catch) {
5365 CHECK(try_catch->HasCaught()); 5365 CHECK(try_catch->HasCaught());
5366 Handle<Message> message = try_catch->Message(); 5366 Handle<Message> message = try_catch->Message();
5367 Handle<Value> resource = message->GetScriptOrigin().ResourceName(); 5367 Handle<Value> resource = message->GetScriptOrigin().ResourceName();
5368 CHECK_EQ(0, strcmp(*v8::String::Utf8Value(resource), "inner")); 5368 CHECK_EQ(0, strcmp(*v8::String::Utf8Value(resource), "inner"));
5369 CHECK_EQ(0, strcmp(*v8::String::Utf8Value(message->Get()), 5369 CHECK_EQ(0, strcmp(*v8::String::Utf8Value(message->Get()),
5370 "Uncaught Error: a")); 5370 "Uncaught Error: a"));
5371 CHECK_EQ(1, message->GetLineNumber()); 5371 CHECK_EQ(1, message->GetLineNumber());
5372 // TODO(mstarzinger): Our compilers disagree about the position. 5372 CHECK_EQ(6, message->GetStartColumn());
5373 CHECK_EQ(i::FLAG_always_opt ? 0 : 6, message->GetStartColumn());
5374 } 5373 }
5375 5374
5376 5375
5377 void TryCatchMixedNestingHelper( 5376 void TryCatchMixedNestingHelper(
5378 const v8::FunctionCallbackInfo<v8::Value>& args) { 5377 const v8::FunctionCallbackInfo<v8::Value>& args) {
5379 ApiTestFuzzer::Fuzz(); 5378 ApiTestFuzzer::Fuzz();
5380 v8::TryCatch try_catch; 5379 v8::TryCatch try_catch;
5381 CompileRunWithOrigin("throw new Error('a');\n", "inner", 0, 0); 5380 CompileRunWithOrigin("throw new Error('a');\n", "inner", 0, 0);
5382 CHECK(try_catch.HasCaught()); 5381 CHECK(try_catch.HasCaught());
5383 TryCatchMixedNestingCheck(&try_catch); 5382 TryCatchMixedNestingCheck(&try_catch);
(...skipping 17446 matching lines...) Expand 10 before | Expand all | Expand 10 after
22830 desc = x->GetOwnPropertyDescriptor(v8_str("p1")); 22829 desc = x->GetOwnPropertyDescriptor(v8_str("p1"));
22831 Local<Function> set = 22830 Local<Function> set =
22832 Local<Function>::Cast(Local<Object>::Cast(desc)->Get(v8_str("set"))); 22831 Local<Function>::Cast(Local<Object>::Cast(desc)->Get(v8_str("set")));
22833 Local<Function> get = 22832 Local<Function> get =
22834 Local<Function>::Cast(Local<Object>::Cast(desc)->Get(v8_str("get"))); 22833 Local<Function>::Cast(Local<Object>::Cast(desc)->Get(v8_str("get")));
22835 CHECK_EQ(v8_num(13), get->Call(x, 0, NULL)); 22834 CHECK_EQ(v8_num(13), get->Call(x, 0, NULL));
22836 Handle<Value> args[] = { v8_num(14) }; 22835 Handle<Value> args[] = { v8_num(14) };
22837 set->Call(x, 1, args); 22836 set->Call(x, 1, args);
22838 CHECK_EQ(v8_num(14), get->Call(x, 0, NULL)); 22837 CHECK_EQ(v8_num(14), get->Call(x, 0, NULL));
22839 } 22838 }
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