| OLD | NEW |
| 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 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1289 preparser_message->ToCString().get()); | 1289 preparser_message->ToCString().get()); |
| 1290 CHECK(false); | 1290 CHECK(false); |
| 1291 } | 1291 } |
| 1292 } else if (preparse_error) { | 1292 } else if (preparse_error) { |
| 1293 v8::base::OS::Print( | 1293 v8::base::OS::Print( |
| 1294 "Preparser failed on:\n" | 1294 "Preparser failed on:\n" |
| 1295 "\t%s\n" | 1295 "\t%s\n" |
| 1296 "with error:\n" | 1296 "with error:\n" |
| 1297 "\t%s\n" | 1297 "\t%s\n" |
| 1298 "However, the parser succeeded", | 1298 "However, the parser succeeded", |
| 1299 source->ToCString().get(), FormatMessage(log.ErrorMessageData())); | 1299 source->ToCString().get(), |
| 1300 FormatMessage(log.ErrorMessageData())->ToCString().get()); |
| 1300 CHECK(false); | 1301 CHECK(false); |
| 1301 } else if (result == kError) { | 1302 } else if (result == kError) { |
| 1302 v8::base::OS::Print( | 1303 v8::base::OS::Print( |
| 1303 "Expected error on:\n" | 1304 "Expected error on:\n" |
| 1304 "\t%s\n" | 1305 "\t%s\n" |
| 1305 "However, parser and preparser succeeded", | 1306 "However, parser and preparser succeeded", |
| 1306 source->ToCString().get()); | 1307 source->ToCString().get()); |
| 1307 CHECK(false); | 1308 CHECK(false); |
| 1308 } | 1309 } |
| 1309 } | 1310 } |
| (...skipping 1602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2912 LocalContext env; | 2913 LocalContext env; |
| 2913 int use_counts[v8::Isolate::kUseCounterFeatureCount] = {}; | 2914 int use_counts[v8::Isolate::kUseCounterFeatureCount] = {}; |
| 2914 global_use_counts = use_counts; | 2915 global_use_counts = use_counts; |
| 2915 CcTest::isolate()->SetUseCounterCallback(MockUseCounterCallback); | 2916 CcTest::isolate()->SetUseCounterCallback(MockUseCounterCallback); |
| 2916 CompileRun("\"use asm\";\n" | 2917 CompileRun("\"use asm\";\n" |
| 2917 "var foo = 1;\n" | 2918 "var foo = 1;\n" |
| 2918 "\"use asm\";\n" // Only the first one counts. | 2919 "\"use asm\";\n" // Only the first one counts. |
| 2919 "function bar() { \"use asm\"; var baz = 1; }"); | 2920 "function bar() { \"use asm\"; var baz = 1; }"); |
| 2920 CHECK_EQ(2, use_counts[v8::Isolate::kUseAsm]); | 2921 CHECK_EQ(2, use_counts[v8::Isolate::kUseAsm]); |
| 2921 } | 2922 } |
| OLD | NEW |