| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 i::Vector<const char> log( | 369 i::Vector<const char> log( |
| 370 i::ReadFile(initialize_logger.StopLoggingGetTempFile(), &exists, true)); | 370 i::ReadFile(initialize_logger.StopLoggingGetTempFile(), &exists, true)); |
| 371 CHECK(exists); | 371 CHECK(exists); |
| 372 | 372 |
| 373 Address ObjMethod1_entry = reinterpret_cast<Address>(ObjMethod1); | 373 Address ObjMethod1_entry = reinterpret_cast<Address>(ObjMethod1); |
| 374 #if USES_FUNCTION_DESCRIPTORS | 374 #if USES_FUNCTION_DESCRIPTORS |
| 375 ObjMethod1_entry = *FUNCTION_ENTRYPOINT_ADDRESS(ObjMethod1_entry); | 375 ObjMethod1_entry = *FUNCTION_ENTRYPOINT_ADDRESS(ObjMethod1_entry); |
| 376 #endif | 376 #endif |
| 377 i::EmbeddedVector<char, 100> ref_data; | 377 i::EmbeddedVector<char, 100> ref_data; |
| 378 i::SNPrintF(ref_data, "code-creation,Callback,-2,%p,1,\"method1\"", | 378 i::SNPrintF(ref_data, "code-creation,Callback,-2,%p,1,\"method1\"", |
| 379 ObjMethod1_entry); | 379 static_cast<void*>(ObjMethod1_entry)); |
| 380 | 380 |
| 381 CHECK(StrNStr(log.start(), ref_data.start(), log.length())); | 381 CHECK(StrNStr(log.start(), ref_data.start(), log.length())); |
| 382 log.Dispose(); | 382 log.Dispose(); |
| 383 } | 383 } |
| 384 isolate->Dispose(); | 384 isolate->Dispose(); |
| 385 } | 385 } |
| 386 | 386 |
| 387 | 387 |
| 388 static void Prop1Getter(v8::Local<v8::String> property, | 388 static void Prop1Getter(v8::Local<v8::String> property, |
| 389 const v8::PropertyCallbackInfo<v8::Value>& info) { | 389 const v8::PropertyCallbackInfo<v8::Value>& info) { |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 i::ReadFile(initialize_logger.StopLoggingGetTempFile(), &exists, true)); | 422 i::ReadFile(initialize_logger.StopLoggingGetTempFile(), &exists, true)); |
| 423 CHECK(exists); | 423 CHECK(exists); |
| 424 | 424 |
| 425 Address Prop1Getter_entry = reinterpret_cast<Address>(Prop1Getter); | 425 Address Prop1Getter_entry = reinterpret_cast<Address>(Prop1Getter); |
| 426 #if USES_FUNCTION_DESCRIPTORS | 426 #if USES_FUNCTION_DESCRIPTORS |
| 427 Prop1Getter_entry = *FUNCTION_ENTRYPOINT_ADDRESS(Prop1Getter_entry); | 427 Prop1Getter_entry = *FUNCTION_ENTRYPOINT_ADDRESS(Prop1Getter_entry); |
| 428 #endif | 428 #endif |
| 429 EmbeddedVector<char, 100> prop1_getter_record; | 429 EmbeddedVector<char, 100> prop1_getter_record; |
| 430 i::SNPrintF(prop1_getter_record, | 430 i::SNPrintF(prop1_getter_record, |
| 431 "code-creation,Callback,-2,%p,1,\"get prop1\"", | 431 "code-creation,Callback,-2,%p,1,\"get prop1\"", |
| 432 Prop1Getter_entry); | 432 static_cast<void*>(Prop1Getter_entry)); |
| 433 CHECK(StrNStr(log.start(), prop1_getter_record.start(), log.length())); | 433 CHECK(StrNStr(log.start(), prop1_getter_record.start(), log.length())); |
| 434 | 434 |
| 435 Address Prop1Setter_entry = reinterpret_cast<Address>(Prop1Setter); | 435 Address Prop1Setter_entry = reinterpret_cast<Address>(Prop1Setter); |
| 436 #if USES_FUNCTION_DESCRIPTORS | 436 #if USES_FUNCTION_DESCRIPTORS |
| 437 Prop1Setter_entry = *FUNCTION_ENTRYPOINT_ADDRESS(Prop1Setter_entry); | 437 Prop1Setter_entry = *FUNCTION_ENTRYPOINT_ADDRESS(Prop1Setter_entry); |
| 438 #endif | 438 #endif |
| 439 EmbeddedVector<char, 100> prop1_setter_record; | 439 EmbeddedVector<char, 100> prop1_setter_record; |
| 440 i::SNPrintF(prop1_setter_record, | 440 i::SNPrintF(prop1_setter_record, |
| 441 "code-creation,Callback,-2,%p,1,\"set prop1\"", | 441 "code-creation,Callback,-2,%p,1,\"set prop1\"", |
| 442 Prop1Setter_entry); | 442 static_cast<void*>(Prop1Setter_entry)); |
| 443 CHECK(StrNStr(log.start(), prop1_setter_record.start(), log.length())); | 443 CHECK(StrNStr(log.start(), prop1_setter_record.start(), log.length())); |
| 444 | 444 |
| 445 Address Prop2Getter_entry = reinterpret_cast<Address>(Prop2Getter); | 445 Address Prop2Getter_entry = reinterpret_cast<Address>(Prop2Getter); |
| 446 #if USES_FUNCTION_DESCRIPTORS | 446 #if USES_FUNCTION_DESCRIPTORS |
| 447 Prop2Getter_entry = *FUNCTION_ENTRYPOINT_ADDRESS(Prop2Getter_entry); | 447 Prop2Getter_entry = *FUNCTION_ENTRYPOINT_ADDRESS(Prop2Getter_entry); |
| 448 #endif | 448 #endif |
| 449 EmbeddedVector<char, 100> prop2_getter_record; | 449 EmbeddedVector<char, 100> prop2_getter_record; |
| 450 i::SNPrintF(prop2_getter_record, | 450 i::SNPrintF(prop2_getter_record, |
| 451 "code-creation,Callback,-2,%p,1,\"get prop2\"", | 451 "code-creation,Callback,-2,%p,1,\"get prop2\"", |
| 452 Prop2Getter_entry); | 452 static_cast<void*>(Prop2Getter_entry)); |
| 453 CHECK(StrNStr(log.start(), prop2_getter_record.start(), log.length())); | 453 CHECK(StrNStr(log.start(), prop2_getter_record.start(), log.length())); |
| 454 log.Dispose(); | 454 log.Dispose(); |
| 455 } | 455 } |
| 456 isolate->Dispose(); | 456 isolate->Dispose(); |
| 457 } | 457 } |
| 458 | 458 |
| 459 | 459 |
| 460 typedef i::NativesCollection<i::TEST> TestSources; | 460 typedef i::NativesCollection<i::TEST> TestSources; |
| 461 | 461 |
| 462 | 462 |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac" | 608 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac" |
| 609 "(){})();"; | 609 "(){})();"; |
| 610 | 610 |
| 611 CompileRun(source_text); | 611 CompileRun(source_text); |
| 612 | 612 |
| 613 // Must not crash. | 613 // Must not crash. |
| 614 logger->LogCompiledFunctions(); | 614 logger->LogCompiledFunctions(); |
| 615 } | 615 } |
| 616 isolate->Dispose(); | 616 isolate->Dispose(); |
| 617 } | 617 } |
| OLD | NEW |