Commit b275457e authored by zhengxing.li's avatar zhengxing.li Committed by Commit bot

[builtins] Fixed a Gcc compilation error in src/code-stub-assembler.cc.

  The CL #40373 (https://codereview.chromium.org/2405253006 ) caused a Gcc compilation error.

  The error message was:
  ../src/code-stub-assembler.cc: In member function ‘v8::internal::compiler::Node* v8::internal::CodeStubAssembler::CreateArrayIterator(v8::internal::compiler::Node*, v8::internal::compiler::Node*, v8::internal::compiler::Node*, v8::internal::compiler::Node*, v8::internal::IterationKind)’:
  ../src/code-stub-assembler.cc:7909:7: error: ‘kBaseMapIndex’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
     int kBaseMapIndex;
         ^
  cc1plus: all warnings being treated as errors
  make[1]: *** [/home/zxli/work/google-v8/v8/out/x87.release/obj.target/v8_base/src/code-stub-assembler.o] Error 1

  This CL fixed this issue by initalizing kBaseMapIndex to 0.

BUG=

Review-Url: https://codereview.chromium.org/2423343002
Cr-Commit-Position: refs/heads/master@{#40390}
parent 62649b82
......@@ -7906,7 +7906,7 @@ compiler::Node* CodeStubAssembler::NumberInc(compiler::Node* value) {
compiler::Node* CodeStubAssembler::CreateArrayIterator(
compiler::Node* array, compiler::Node* array_map,
compiler::Node* array_type, compiler::Node* context, IterationKind mode) {
int kBaseMapIndex;
int kBaseMapIndex = 0;
switch (mode) {
case IterationKind::kKeys:
kBaseMapIndex = Context::TYPED_ARRAY_KEY_ITERATOR_MAP_INDEX;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment