http://codereview.chromium.org/9455088/diff/21035/src/arm/code-stubs-arm.cc
File src/arm/code-stubs-arm.cc (right):

http://codereview.chromium.org/9455088/diff/21035/src/arm/code-stubs-arm.cc#newcode4135
src/arm/code-stubs-arm.cc:4135: map =
Register::from_code(kRegisterNoneCode);
On 2012/03/07 12:01:34, fschneider wrote:
Why do you need to replace no_reg here?

I don't need this change indeed. I fixed this place and the other ones.

http://codereview.chromium.org/9455088/diff/21035/src/arm/code-stubs-arm.cc#newcode4886
src/arm/code-stubs-arm.cc:4886: __ LeaveExitFrame(false,
Register::from_code(kRegisterNoneCode));
On 2012/03/07 12:01:34, fschneider wrote:
Why do you need to replace no_reg here?

Done.

http://codereview.chromium.org/9455088/diff/21035/src/ia32/code-stubs-ia32.cc
File src/ia32/code-stubs-ia32.cc (right):

http://codereview.chromium.org/9455088/diff/21035/src/ia32/code-stubs-ia32.cc#newcode7036
src/ia32/code-stubs-ia32.cc:7036: #define REG(Name) { kRegister ## Name
## Code }
On 2012/03/07 12:01:34, fschneider wrote:
Yes, I'd rather prefer kRegister_eax_Code in this case, so that the
names used
here match the rest of the register names.

Done.

http://codereview.chromium.org/9455088/diff/21035/src/isolate.cc
File src/isolate.cc (right):

http://codereview.chromium.org/9455088/diff/21035/src/isolate.cc#newcode410
src/isolate.cc:410: return
global_state.Pointer()->default_isolate->stack_guard();
On 2012/03/07 12:01:34, fschneider wrote:
Here you use Pointer() and further down Get(). It would be nice to be
consistent. i.e. use Pointer() only if a pointer is actually needed,
otherwise
Get().

I initially made LazyInstance::Get() return a const reference as opposed
to a reference to avoid violating the Google C++ guidelines.
To be clear, Get() returns a const reference and Pointer() returns a
non-const pointer.

The logic here, which is not obvious, is that Pointer() is used (as
opposed to Get()) whenever we need a pointer or need to call a non-const
method or access to a mutable field.

In that particular case, stack_guard() is non-const, therefore
default_isolate must be accessed in a non-const way (using Pointer()).

http://codereview.chromium.org/9455088/

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to