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