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

Unified Diff: runtime/vm/code_patcher_ia32.cc

Issue 9414003: Initial implementation of a flow-graph builder for Dart's AST. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rely on assumption that code can reach both branches of a condition. Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/ast.h ('k') | runtime/vm/compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_patcher_ia32.cc
diff --git a/runtime/vm/code_patcher_ia32.cc b/runtime/vm/code_patcher_ia32.cc
index 6b3a3d56578eebf6a0b28fdea6f691859d2e7c7b..9d112ba195d0554f67e471c3d36e0dd467711e88 100644
--- a/runtime/vm/code_patcher_ia32.cc
+++ b/runtime/vm/code_patcher_ia32.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -181,11 +181,11 @@ static void SwapCode(intptr_t num_bytes, char* a, char* b) {
// The patch code buffer contains the jmp code which will be inserted at
// entry point.
void CodePatcher::PatchEntry(const Code& code) {
- Jump jmp_entry(code.EntryPoint());
+ JumpPattern jmp_entry(code.EntryPoint());
ASSERT(!jmp_entry.IsValid());
const uword patch_buffer = code.GetPatchCodePc();
ASSERT(patch_buffer != 0);
- Jump jmp_patch(patch_buffer);
+ JumpPattern jmp_patch(patch_buffer);
ASSERT(jmp_patch.IsValid());
const uword jump_target = jmp_patch.TargetAddress();
SwapCode(jmp_patch.pattern_length_in_bytes(),
@@ -198,13 +198,13 @@ void CodePatcher::PatchEntry(const Code& code) {
// The entry point is a jmp instruction, the patch code buffer contains
// original code, the entry point contains the jump instruction.
void CodePatcher::RestoreEntry(const Code& code) {
- Jump jmp_entry(code.EntryPoint());
+ JumpPattern jmp_entry(code.EntryPoint());
ASSERT(jmp_entry.IsValid());
const uword jump_target = jmp_entry.TargetAddress();
const uword patch_buffer = code.GetPatchCodePc();
ASSERT(patch_buffer != 0);
// 'patch_buffer' contains original entry code.
- Jump jmp_patch(patch_buffer);
+ JumpPattern jmp_patch(patch_buffer);
ASSERT(!jmp_patch.IsValid());
SwapCode(jmp_patch.pattern_length_in_bytes(),
reinterpret_cast<char*>(code.EntryPoint()),
@@ -215,7 +215,7 @@ void CodePatcher::RestoreEntry(const Code& code) {
bool CodePatcher::CodeIsPatchable(const Code& code) {
- Jump jmp_entry(code.EntryPoint());
+ JumpPattern jmp_entry(code.EntryPoint());
if (code.Size() < (jmp_entry.pattern_length_in_bytes() * 2)) {
return false;
}
« no previous file with comments | « runtime/vm/ast.h ('k') | runtime/vm/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698