OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 #ifdef ENABLE_DEBUGGER_SUPPORT | 47 #ifdef ENABLE_DEBUGGER_SUPPORT |
48 | 48 |
49 | 49 |
50 void SetElementNonStrict(Handle<JSObject> object, | 50 void SetElementNonStrict(Handle<JSObject> object, |
51 uint32_t index, | 51 uint32_t index, |
52 Handle<Object> value) { | 52 Handle<Object> value) { |
53 // Ignore return value from SetElement. It can only be a failure if there | 53 // Ignore return value from SetElement. It can only be a failure if there |
54 // are element setters causing exceptions and the debugger context has none | 54 // are element setters causing exceptions and the debugger context has none |
55 // of these. | 55 // of these. |
56 Handle<Object> no_failure; | 56 Handle<Object> no_failure; |
57 no_failure = SetElement(object, index, value, kNonStrictMode); | 57 no_failure = JSObject::SetElement(object, index, value, kNonStrictMode); |
58 ASSERT(!no_failure.is_null()); | 58 ASSERT(!no_failure.is_null()); |
59 USE(no_failure); | 59 USE(no_failure); |
60 } | 60 } |
61 | 61 |
62 // A simple implementation of dynamic programming algorithm. It solves | 62 // A simple implementation of dynamic programming algorithm. It solves |
63 // the problem of finding the difference of 2 arrays. It uses a table of results | 63 // the problem of finding the difference of 2 arrays. It uses a table of results |
64 // of subproblems. Each cell contains a number together with 2-bit flag | 64 // of subproblems. Each cell contains a number together with 2-bit flag |
65 // that helps building the chunk list. | 65 // that helps building the chunk list. |
66 class Differencer { | 66 class Differencer { |
67 public: | 67 public: |
(...skipping 1153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1221 new_buffer_size = 4 * KB; | 1221 new_buffer_size = 4 * KB; |
1222 } else { | 1222 } else { |
1223 new_buffer_size = 2 * buffer_size_; | 1223 new_buffer_size = 2 * buffer_size_; |
1224 } | 1224 } |
1225 // Some internal data structures overflow for very large buffers, | 1225 // Some internal data structures overflow for very large buffers, |
1226 // they must ensure that kMaximalBufferSize is not too large. | 1226 // they must ensure that kMaximalBufferSize is not too large. |
1227 if (new_buffer_size > kMaximalBufferSize) { | 1227 if (new_buffer_size > kMaximalBufferSize) { |
1228 V8::FatalProcessOutOfMemory("RelocInfoBuffer::GrowBuffer"); | 1228 V8::FatalProcessOutOfMemory("RelocInfoBuffer::GrowBuffer"); |
1229 } | 1229 } |
1230 | 1230 |
1231 // Setup new buffer. | 1231 // Set up new buffer. |
1232 byte* new_buffer = NewArray<byte>(new_buffer_size); | 1232 byte* new_buffer = NewArray<byte>(new_buffer_size); |
1233 | 1233 |
1234 // Copy the data. | 1234 // Copy the data. |
1235 int curently_used_size = | 1235 int curently_used_size = |
1236 static_cast<int>(buffer_ + buffer_size_ - reloc_info_writer_.pos()); | 1236 static_cast<int>(buffer_ + buffer_size_ - reloc_info_writer_.pos()); |
1237 memmove(new_buffer + new_buffer_size - curently_used_size, | 1237 memmove(new_buffer + new_buffer_size - curently_used_size, |
1238 reloc_info_writer_.pos(), curently_used_size); | 1238 reloc_info_writer_.pos(), curently_used_size); |
1239 | 1239 |
1240 reloc_info_writer_.Reposition( | 1240 reloc_info_writer_.Reposition( |
1241 new_buffer + new_buffer_size - curently_used_size, | 1241 new_buffer + new_buffer_size - curently_used_size, |
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1765 | 1765 |
1766 bool LiveEditFunctionTracker::IsActive(Isolate* isolate) { | 1766 bool LiveEditFunctionTracker::IsActive(Isolate* isolate) { |
1767 return false; | 1767 return false; |
1768 } | 1768 } |
1769 | 1769 |
1770 #endif // ENABLE_DEBUGGER_SUPPORT | 1770 #endif // ENABLE_DEBUGGER_SUPPORT |
1771 | 1771 |
1772 | 1772 |
1773 | 1773 |
1774 } } // namespace v8::internal | 1774 } } // namespace v8::internal |
OLD | NEW |