| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 63 using ::v8::internal::StepAction; | 63 using ::v8::internal::StepAction; | 
| 64 using ::v8::internal::StepIn;  // From StepAction enum | 64 using ::v8::internal::StepIn;  // From StepAction enum | 
| 65 using ::v8::internal::StepNext;  // From StepAction enum | 65 using ::v8::internal::StepNext;  // From StepAction enum | 
| 66 using ::v8::internal::StepOut;  // From StepAction enum | 66 using ::v8::internal::StepOut;  // From StepAction enum | 
| 67 using ::v8::internal::Vector; | 67 using ::v8::internal::Vector; | 
| 68 using ::v8::internal::StrLength; | 68 using ::v8::internal::StrLength; | 
| 69 | 69 | 
| 70 // Size of temp buffer for formatting small strings. | 70 // Size of temp buffer for formatting small strings. | 
| 71 #define SMALL_STRING_BUFFER_SIZE 80 | 71 #define SMALL_STRING_BUFFER_SIZE 80 | 
| 72 | 72 | 
| 73 // --- A d d i t i o n a l   C h e c k   H e l p e r s |  | 
| 74 |  | 
| 75 |  | 
| 76 // Helper function used by the CHECK_EQ function when given Address |  | 
| 77 // arguments.  Should not be called directly. |  | 
| 78 static inline void CheckEqualsHelper(const char* file, int line, |  | 
| 79                                      const char* expected_source, |  | 
| 80                                      ::v8::internal::Address expected, |  | 
| 81                                      const char* value_source, |  | 
| 82                                      ::v8::internal::Address value) { |  | 
| 83   if (expected != value) { |  | 
| 84     V8_Fatal(file, line, "CHECK_EQ(%s, %s) failed\n#   " |  | 
| 85                          "Expected: %i\n#   Found: %i", |  | 
| 86              expected_source, value_source, expected, value); |  | 
| 87   } |  | 
| 88 } |  | 
| 89 |  | 
| 90 |  | 
| 91 // Helper function used by the CHECK_NE function when given Address |  | 
| 92 // arguments.  Should not be called directly. |  | 
| 93 static inline void CheckNonEqualsHelper(const char* file, int line, |  | 
| 94                                         const char* unexpected_source, |  | 
| 95                                         ::v8::internal::Address unexpected, |  | 
| 96                                         const char* value_source, |  | 
| 97                                         ::v8::internal::Address value) { |  | 
| 98   if (unexpected == value) { |  | 
| 99     V8_Fatal(file, line, "CHECK_NE(%s, %s) failed\n#   Value: %i", |  | 
| 100              unexpected_source, value_source, value); |  | 
| 101   } |  | 
| 102 } |  | 
| 103 |  | 
| 104 |  | 
| 105 // Helper function used by the CHECK function when given code |  | 
| 106 // arguments.  Should not be called directly. |  | 
| 107 static inline void CheckEqualsHelper(const char* file, int line, |  | 
| 108                                      const char* expected_source, |  | 
| 109                                      const Code* expected, |  | 
| 110                                      const char* value_source, |  | 
| 111                                      const Code* value) { |  | 
| 112   if (expected != value) { |  | 
| 113     V8_Fatal(file, line, "CHECK_EQ(%s, %s) failed\n#   " |  | 
| 114                          "Expected: %p\n#   Found: %p", |  | 
| 115              expected_source, value_source, expected, value); |  | 
| 116   } |  | 
| 117 } |  | 
| 118 |  | 
| 119 |  | 
| 120 static inline void CheckNonEqualsHelper(const char* file, int line, |  | 
| 121                                         const char* expected_source, |  | 
| 122                                         const Code* expected, |  | 
| 123                                         const char* value_source, |  | 
| 124                                         const Code* value) { |  | 
| 125   if (expected == value) { |  | 
| 126     V8_Fatal(file, line, "CHECK_NE(%s, %s) failed\n#   Value: %p", |  | 
| 127              expected_source, value_source, value); |  | 
| 128   } |  | 
| 129 } |  | 
| 130 |  | 
| 131 |  | 
| 132 // --- H e l p e r   C l a s s e s | 73 // --- H e l p e r   C l a s s e s | 
| 133 | 74 | 
| 134 | 75 | 
| 135 // Helper class for creating a V8 enviromnent for running tests | 76 // Helper class for creating a V8 enviromnent for running tests | 
| 136 class DebugLocalContext { | 77 class DebugLocalContext { | 
| 137  public: | 78  public: | 
| 138   inline DebugLocalContext( | 79   inline DebugLocalContext( | 
| 139       v8::ExtensionConfiguration* extensions = 0, | 80       v8::ExtensionConfiguration* extensions = 0, | 
| 140       v8::Handle<v8::ObjectTemplate> global_template = | 81       v8::Handle<v8::ObjectTemplate> global_template = | 
| 141           v8::Handle<v8::ObjectTemplate>(), | 82           v8::Handle<v8::ObjectTemplate>(), | 
| (...skipping 7585 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 7727 TEST(LiveEditDisabled) { | 7668 TEST(LiveEditDisabled) { | 
| 7728   v8::internal::FLAG_allow_natives_syntax = true; | 7669   v8::internal::FLAG_allow_natives_syntax = true; | 
| 7729   LocalContext env; | 7670   LocalContext env; | 
| 7730   v8::HandleScope scope(env->GetIsolate()); | 7671   v8::HandleScope scope(env->GetIsolate()); | 
| 7731   v8::Debug::SetLiveEditEnabled(false, env->GetIsolate()); | 7672   v8::Debug::SetLiveEditEnabled(false, env->GetIsolate()); | 
| 7732   CompileRun("%LiveEditCompareStrings('', '')"); | 7673   CompileRun("%LiveEditCompareStrings('', '')"); | 
| 7733 } | 7674 } | 
| 7734 | 7675 | 
| 7735 | 7676 | 
| 7736 #endif  // ENABLE_DEBUGGER_SUPPORT | 7677 #endif  // ENABLE_DEBUGGER_SUPPORT | 
| OLD | NEW | 
|---|