Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/liveedit.cc

Issue 6717018: Introduce accessors on builtins instance (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix tests and lint. Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ic.cc ('k') | src/log.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after
1026 Handle<Code> new_original_code = 1026 Handle<Code> new_original_code =
1027 FACTORY->CopyCode(compile_info_wrapper.GetFunctionCode()); 1027 FACTORY->CopyCode(compile_info_wrapper.GetFunctionCode());
1028 debug_info->set_original_code(*new_original_code); 1028 debug_info->set_original_code(*new_original_code);
1029 } 1029 }
1030 1030
1031 shared_info->set_start_position(compile_info_wrapper.GetStartPosition()); 1031 shared_info->set_start_position(compile_info_wrapper.GetStartPosition());
1032 shared_info->set_end_position(compile_info_wrapper.GetEndPosition()); 1032 shared_info->set_end_position(compile_info_wrapper.GetEndPosition());
1033 1033
1034 shared_info->set_construct_stub( 1034 shared_info->set_construct_stub(
1035 Isolate::Current()->builtins()->builtin( 1035 Isolate::Current()->builtins()->builtin(
1036 Builtins::JSConstructStubGeneric)); 1036 Builtins::kJSConstructStubGeneric));
1037 1037
1038 DeoptimizeDependentFunctions(*shared_info); 1038 DeoptimizeDependentFunctions(*shared_info);
1039 Isolate::Current()->compilation_cache()->Remove(shared_info); 1039 Isolate::Current()->compilation_cache()->Remove(shared_info);
1040 1040
1041 return HEAP->undefined_value(); 1041 return HEAP->undefined_value();
1042 } 1042 }
1043 1043
1044 1044
1045 MaybeObject* LiveEdit::FunctionSourceUpdated( 1045 MaybeObject* LiveEdit::FunctionSourceUpdated(
1046 Handle<JSArray> shared_info_array) { 1046 Handle<JSArray> shared_info_array) {
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
1397 if (pre_top_frame_code->is_inline_cache_stub() && 1397 if (pre_top_frame_code->is_inline_cache_stub() &&
1398 pre_top_frame_code->ic_state() == DEBUG_BREAK) { 1398 pre_top_frame_code->ic_state() == DEBUG_BREAK) {
1399 // OK, we can drop inline cache calls. 1399 // OK, we can drop inline cache calls.
1400 *mode = Debug::FRAME_DROPPED_IN_IC_CALL; 1400 *mode = Debug::FRAME_DROPPED_IN_IC_CALL;
1401 } else if (pre_top_frame_code == 1401 } else if (pre_top_frame_code ==
1402 Isolate::Current()->debug()->debug_break_slot()) { 1402 Isolate::Current()->debug()->debug_break_slot()) {
1403 // OK, we can drop debug break slot. 1403 // OK, we can drop debug break slot.
1404 *mode = Debug::FRAME_DROPPED_IN_DEBUG_SLOT_CALL; 1404 *mode = Debug::FRAME_DROPPED_IN_DEBUG_SLOT_CALL;
1405 } else if (pre_top_frame_code == 1405 } else if (pre_top_frame_code ==
1406 Isolate::Current()->builtins()->builtin( 1406 Isolate::Current()->builtins()->builtin(
1407 Builtins::FrameDropper_LiveEdit)) { 1407 Builtins::kFrameDropper_LiveEdit)) {
1408 // OK, we can drop our own code. 1408 // OK, we can drop our own code.
1409 *mode = Debug::FRAME_DROPPED_IN_DIRECT_CALL; 1409 *mode = Debug::FRAME_DROPPED_IN_DIRECT_CALL;
1410 } else if (pre_top_frame_code->kind() == Code::STUB && 1410 } else if (pre_top_frame_code->kind() == Code::STUB &&
1411 pre_top_frame_code->major_key()) { 1411 pre_top_frame_code->major_key()) {
1412 // Entry from our unit tests, it's fine, we support this case. 1412 // Entry from our unit tests, it's fine, we support this case.
1413 *mode = Debug::FRAME_DROPPED_IN_DIRECT_CALL; 1413 *mode = Debug::FRAME_DROPPED_IN_DIRECT_CALL;
1414 } else { 1414 } else {
1415 return "Unknown structure of stack above changing function"; 1415 return "Unknown structure of stack above changing function";
1416 } 1416 }
1417 1417
1418 Address unused_stack_top = top_frame->sp(); 1418 Address unused_stack_top = top_frame->sp();
1419 Address unused_stack_bottom = bottom_js_frame->fp() 1419 Address unused_stack_bottom = bottom_js_frame->fp()
1420 - Debug::kFrameDropperFrameSize * kPointerSize // Size of the new frame. 1420 - Debug::kFrameDropperFrameSize * kPointerSize // Size of the new frame.
1421 + kPointerSize; // Bigger address end is exclusive. 1421 + kPointerSize; // Bigger address end is exclusive.
1422 1422
1423 if (unused_stack_top > unused_stack_bottom) { 1423 if (unused_stack_top > unused_stack_bottom) {
1424 return "Not enough space for frame dropper frame"; 1424 return "Not enough space for frame dropper frame";
1425 } 1425 }
1426 1426
1427 // Committing now. After this point we should return only NULL value. 1427 // Committing now. After this point we should return only NULL value.
1428 1428
1429 FixTryCatchHandler(pre_top_frame, bottom_js_frame); 1429 FixTryCatchHandler(pre_top_frame, bottom_js_frame);
1430 // Make sure FixTryCatchHandler is idempotent. 1430 // Make sure FixTryCatchHandler is idempotent.
1431 ASSERT(!FixTryCatchHandler(pre_top_frame, bottom_js_frame)); 1431 ASSERT(!FixTryCatchHandler(pre_top_frame, bottom_js_frame));
1432 1432
1433 Handle<Code> code(Isolate::Current()->builtins()->builtin( 1433 Handle<Code> code = Isolate::Current()->builtins()->FrameDropper_LiveEdit();
1434 Builtins::FrameDropper_LiveEdit));
1435 top_frame->set_pc(code->entry()); 1434 top_frame->set_pc(code->entry());
1436 pre_top_frame->SetCallerFp(bottom_js_frame->fp()); 1435 pre_top_frame->SetCallerFp(bottom_js_frame->fp());
1437 1436
1438 *restarter_frame_function_pointer = 1437 *restarter_frame_function_pointer =
1439 Debug::SetUpFrameDropperFrame(bottom_js_frame, code); 1438 Debug::SetUpFrameDropperFrame(bottom_js_frame, code);
1440 1439
1441 ASSERT((**restarter_frame_function_pointer)->IsJSFunction()); 1440 ASSERT((**restarter_frame_function_pointer)->IsJSFunction());
1442 1441
1443 for (Address a = unused_stack_top; 1442 for (Address a = unused_stack_top;
1444 a < unused_stack_bottom; 1443 a < unused_stack_bottom;
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
1681 1680
1682 bool LiveEditFunctionTracker::IsActive() { 1681 bool LiveEditFunctionTracker::IsActive() {
1683 return false; 1682 return false;
1684 } 1683 }
1685 1684
1686 #endif // ENABLE_DEBUGGER_SUPPORT 1685 #endif // ENABLE_DEBUGGER_SUPPORT
1687 1686
1688 1687
1689 1688
1690 } } // namespace v8::internal 1689 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ic.cc ('k') | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698